[tor-bugs] #7105 [Tor]: Use queue.h as our linked list implementation

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sat Oct 13 00:20:43 UTC 2012


#7105: Use queue.h as our linked list implementation
-----------------------------------+----------------------------------------
 Reporter:  nickm                  |          Owner:                    
     Type:  enhancement            |         Status:  new               
 Priority:  normal                 |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor                    |        Version:                    
 Keywords:  tor-relay refactoring  |         Parent:                    
   Points:                         |   Actualpoints:                    
-----------------------------------+----------------------------------------
 Linked lists can be tricky.  Doubly linked lists, doubly so.  Even more so
 if you're trying to do the right magic to avoid needless dereferences
 (e.g., storing prev as a pointer-to-pointer).

 So let's use a well-defined abstraction.  Since the BSD days, many
 operating systems have had a sys/queue.h that defines singly- and doubly-
 linked lists and queues.  Let's grab the one from OpenBSD (see commit for
 explanation why) and use that.

 I don't think we should do an all-at-once conversion for all our linked
 lists, but converting them as the opportunity appears would be a good
 thing.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7105>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list