evthread_pthread.c


Log

Author Commit Date CI Message
Nick Mathewson fbaf0770 2010-10-26T12:09:20 Fix bugs in posix thread-id calculation when sizeof(pthread_t) != sizeof(long) When pthread_t was smaller, our calculated thread IDs would include uninitialized RAM, and so our unit tests would fail because thread_ids would never match one another. When pthread_t was larger and alignment was big-endian, our calculated thread IDs would only have the most significant bytes of the pthread_t, when in practice all the entropy is in the low-order bytes. Found with help from Dagobert Michelsen.
Nick Mathewson d4977b52 2010-08-17T13:15:34 Add a condition variable backend, with implementations for pthreads and win32 The interface from the user's POV is similar to the locking implementation: either provide a structure full of function pointers, or just call evthread_use_*_threads() and everything will be okay. The internal interface is meant to vaguely resemble pthread_cond_*, which Windows people will better recognize as *ConditionVariable*.
Nick Mathewson ec347b92 2010-07-07T16:45:03 Move event-config.h to include/event2 This change means that all required include files are in event2, and all files not in event2/* are optional.
Nick Mathewson 17efc1cd 2010-03-04T01:25:51 Update all our copyright notices to say "2010"
Nick Mathewson 347952ff 2009-11-27T15:20:43 Revise the locking API: deprecate the old locking callbacks and add trylock. Previously, there was no good way to request different kinds of lock (say, read/write vs writeonly or recursive vs nonrecursive), or for a lock function to signal failure (which would be important for a trylock mode). This patch revises the lock API to be a bit more useful. The older lock calls are still supported for now. We also add a debugging mode to catch common errors in using the locking APIs.
Nick Mathewson 9bf124bf 2009-11-18T21:16:47 Build correctly with mm replacement turned off. svn:r1547
Nick Mathewson 784b8773 2009-11-06T21:46:57 We do not work any more without an event-config.h; stop pretending that it is meaningful to check for HAVE_CONFIG_H svn:r1516
Nick Mathewson 4ba6eda4 2009-07-17T20:22:56 Make evthread_use_pthreads() actually return 0 on success. svn:r1356
Nick Mathewson ec35eb55 2009-02-12T22:19:54 Make threading functions global, like the mm_ functions. Use the libevent_pthread.la library in regress_pthread. svn:r1121
Nick Mathewson b85b710c 2009-01-27T22:34:36 Update copyright statements to reflect the facts that: a) this is 2009 b) niels and nick have been comaintainers for a while c) saying "all rights reserved" when you then go on to explicitly disclaim some rights is sheer cargo-cultism. svn:r1065
Nick Mathewson 8889a770 2009-01-27T22:30:46 Replace all use of config.h with event-config.h. svn:r1064
Nick Mathewson 309fc7c4 2009-01-21T07:51:25 New functions to provide sane threading callbacks with pthreads and win32 threading implementations. svn:r1031