X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=blobdiff_plain;f=libevent%2Fevent-internal.h;h=1798b702a1034aa050eded48c97ccfae80bfc63e;hp=12ca8bc194d09a9498cdb7c4c85c98620d7fdc9f;hb=eebad2c649b5e3a77d5b6e71456371b7313ec6a5;hpb=14874ef66d68c5200a9a42a7408d022d58211898 diff --git a/libevent/event-internal.h b/libevent/event-internal.h index 12ca8bc1..1798b702 100644 --- a/libevent/event-internal.h +++ b/libevent/event-internal.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2000-2007 Niels Provos - * Copyright (c) 2007-2010 Niels Provos and Nick Mathewson + * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -146,6 +146,9 @@ struct common_timeout_list { struct event_base *base; }; +/** Mask used to get the real tv_usec value from a common timeout. */ +#define COMMON_TIMEOUT_MICROSECONDS_MASK 0x000fffff + struct event_change; /* List of 'changes' since the last call to eventop.dispatch. Only maintained @@ -313,10 +316,12 @@ struct event_config { #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) #endif +#ifndef TAILQ_FOREACH #define TAILQ_FOREACH(var, head, field) \ for ((var) = TAILQ_FIRST(head); \ (var) != TAILQ_END(head); \ (var) = TAILQ_NEXT(var, field)) +#endif #ifndef TAILQ_INSERT_BEFORE #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ @@ -335,12 +340,21 @@ int _evsig_set_handler(struct event_base *base, int evsignal, void (*fn)(int)); int _evsig_restore_handler(struct event_base *base, int evsignal); + void event_active_nolock(struct event *ev, int res, short count); /* FIXME document. */ void event_base_add_virtual(struct event_base *base); void event_base_del_virtual(struct event_base *base); +/** For debugging: unless assertions are disabled, verify the referential + integrity of the internal data structures of 'base'. This operation can + be expensive. + + Returns on success; aborts on failure. +*/ +void event_base_assert_ok(struct event_base *base); + #ifdef __cplusplus } #endif