[tor-bugs] #7479 [Core Tor/Tor]: Replace more linked lists with queue.h implementations

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon May 29 01:07:21 UTC 2017


#7479: Replace more linked lists with queue.h implementations
----------------------------------------------+----------------------------
 Reporter:  nickm                             |          Owner:
     Type:  defect                            |         Status:  new
 Priority:  Low                               |      Milestone:  Tor:
                                              |  unspecified
Component:  Core Tor/Tor                      |        Version:
 Severity:  Normal                            |     Resolution:
 Keywords:  tor-relay refactoring easy intro  |  Actual Points:
Parent ID:                                    |         Points:
 Reviewer:                                    |        Sponsor:
----------------------------------------------+----------------------------

Comment (by nickm):

 Replying to [comment:4 arma]:
 > Replying to [comment:3 nickm]:
 > > Sounds like a double-linked list might work there then.
 >
 > If we're ok walking to the end of the list each time we need to interact
 with the end (which is a big part of what we do with cpaths), sure.

 The BSD TAILQ_* type is exactly what one wants.  It's a doubly-linked list
 with a head pointer to the first and to the last.  See src/ext/tor_queue.h

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


More information about the tor-bugs mailing list