summaryrefslogtreecommitdiffstats
path: root/lib/heap.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixing heap_push.Chris Hall2010-01-201-3/+3
|
* Added qtimer_pile_top_time() to lib/qtimers.cChris Hall (GMCH)2009-12-081-44/+69
| | | | | | | | For use when preparing for pselect or other timed wait. Simplified the handling of pending unsets. Tidied up in heap.c & .h.
* Updates after code review: lib/heap.c & .h lib/vector.c & .hChris Hall (GMCH)2009-12-061-90/+78
| | | | | | | Added vector_unset_item() & recast vector_unset(). Added heap_pop_push_item() and made a number of simple operations Inline functions.
* Pthreads infrastructure -- initial commitChris Hall (GMCH)2009-12-021-0/+504
New files: lib/qpthreads.c & .h Encapsulates the Pthreads facilities to be used in Quagga. Implicitly documents the sub-set of Pthreads being used. Provides error checking for a number of functions which may return errors, but are not generally expected to and for whom an error is treated as fatal. Could be modified to "null out" the use of Pthreads. New files: lib/qtime.c & .h Defines a 64-bit integer time value which is a lot easier to handle than the usual timespec and timeval structures. (C99 requires a 64-bit integer.) Provides front ends for gettimeofday() & clock_gettime() which return 64-bit time value. Also conversions to and from timespec and timeval. Provides a monotonic clock for when CLOCK_MONOTONIC is not available. (This is based on code from Joakim Tjernlund.) New files: lib/heap.c & .h Implements a heap data structure closely allied to the vector. This will be used for timer handling. Modified: lib/memtypes.c New memory types for qpthreads structures and for the heap. Modified: lib/zassert.h Added explicit "passert" == assert which is not subject to NDEBUG. Added explicit "nassert" == assert which is subject to NDEBUG. Added zabort, zabort_errno and zabbort_err for when something has gone fatally wrong. (Require changes to lib/log.c which are TBD.)