summaryrefslogtreecommitdiff
path: root/source4/lib/events
AgeCommit message (Collapse)AuthorFilesLines
2007-12-21r26464: Tighten dependencies.Jelmer Vernooij1-1/+1
(This used to be commit 2b7cfa5d9ab94e1ff2d60719cd3749810463ab15)
2007-12-21r26399: Use -O option for SWIG (less evil generated code).Jelmer Vernooij2-6/+28
(This used to be commit 3378b6a559272cb702b52966692bf423f67a2b41)
2007-12-21r26288: events: events.h uses uint16_t so it needs stdint.hStefan Metzmacher1-1/+1
stdlib.h isn't used directly and talloc.h brings it in anyway this fixes the build of lib/events/./events_wrap.c on older systems linux versions. metze (This used to be commit 60b852688c65edf011d26376f69b615149a49b2e)
2007-12-21r26266: Remove more global_loadparm uses.Jelmer Vernooij1-5/+0
(This used to be commit 99113075c4a96679bcec4f4d6bba4acb3dee4245)
2007-12-21r26248: Check in SWIG output so SWIG is not required when running out of svn.Jelmer Vernooij2-0/+3238
(This used to be commit 08501fbef38f81ce5ff4885a1696f9cb392fd631)
2007-12-21r26195: Wrap two more functions.Jelmer Vernooij1-0/+4
(This used to be commit f7312cbb76d9e237350bc54d97bc06760938e6e3)
2007-12-21r26194: Wrap the events subsystem in a separate file.Jelmer Vernooij2-0/+35
(This used to be commit cfb6bbdc31083308dbff29cf226a092c8a137c2a)
2007-12-21r25903: Move more files out of torture/Jelmer Vernooij1-0/+145
(This used to be commit f734df3144cdd9ff280ee1cac2c3a7f972716f5d)
2007-12-21r25676: fixed a valgrind error in the epoll event backend. The linked listAndrew Tridgell1-3/+2
could get mucked up. (This used to be commit 67240f380b2828eb85463ab2d256ae601f57348f)
2007-10-10r25537: Use new path for events modules.Jelmer Vernooij1-1/+1
(This used to be commit f9270073a282ba94eb4e3f51440d5653480082da)
2007-10-10r25522: Convert to standard bool types.Jelmer Vernooij2-4/+4
(This used to be commit 5e814287ba475e12f8cc934fdd09b199dcdfdb86)
2007-10-10r25446: Merge some changes I made on the way home from SFO:Jelmer Vernooij1-1/+1
2007-09-29 More higher-level passing around of lp_ctx. 2007-09-29 Fix warning. 2007-09-29 Pass loadparm contexts on a higher level. 2007-09-29 Avoid using global loadparm context. (This used to be commit 3468952e771ab31f90b6c374ade01c5550810f42)
2007-10-10r25430: Add the loadparm context to all parametric options.Jelmer Vernooij1-1/+1
(This used to be commit fd697d77c9fe67a00939a1f04b35c451316fff58)
2007-10-10r25035: Fix some more warnings, use service pointer rather than service ↵Jelmer Vernooij1-1/+1
number in more places. (This used to be commit df9cebcb97e20564359097148665bd519f31bc6f)
2007-10-10r25027: Fix more warnings.Jelmer Vernooij1-1/+1
(This used to be commit 5085c53fcfade614e83d21fc2c1a5bc43bb2a729)
2007-10-10r25026: Move param/param.h out of includes.hJelmer Vernooij1-0/+1
(This used to be commit abe8349f9b4387961ff3665d8c589d61cd2edf31)
2007-10-10r24814: Fix headers, trim core.h even more.Jelmer Vernooij1-1/+1
(This used to be commit 9647f860bdd5c0a74583e886182bd041a45e7655)
2007-10-10r24502: More work to get LOCAL-EVENT passing on all platforms:Andrew Bartlett1-11/+18
- Make the epoll_event_context_init() call fail if epoll_create() fails. This should cause this backend to be skipped on host with epoll() in libc but not in the kernel. - At the moment, there is no sensible way to handle failures to add an epoll() event, and 'fallback to select' is misnamed (so we now abort()). Andrew Bartlett (This used to be commit fb1e1eebdae740a2b66ee1ea9e1e35f21292ac14)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell10-30/+20
There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10r23301: merged from ctdbAndrew Tridgell3-0/+6
(This used to be commit 76b981fcefb0dff24ac7d543da70fbb487ed7072)
2007-10-10r22985: don't do checkins late at night ....Andrew Tridgell1-2/+0
thanks to Volker for spotting this! (This used to be commit d28fc5f87fd4d9a9843d1295fe2a181922a476fc)
2007-10-10r22971: fix build on systems without epollAndrew Tridgell1-0/+1
(This used to be commit 146303d91b4c64c87c356c3ed44ccb5774297a71)
2007-10-10r22970: the events code calls close(), which needs to use socket_wrapper.h inAndrew Tridgell3-0/+3
the build farm (This used to be commit 603d8b6f1702d10234b81ccde0649d8be63ae616)
2007-10-10r22968: andrew bartlett pointed out that the parent process could add a fd toAndrew Tridgell3-33/+33
the epoll context which would then appear in the children. To fix this we need to check for pid changes in more places. Luckily on platforms where we have epoll(), getpid() is very very cheap. (This used to be commit 4f84e6d569f9c9d7dd902f4550735f3ce2d3b424)
2007-10-10r22964: log an error on epoll_create failing on reopenAndrew Tridgell3-1/+4
(This used to be commit a69f28599845d3ea3868a574c6b0ba8db8486ef5)
2007-10-10r22963: fixed the epoll/fork interaction in the epoll and aio backendsAndrew Tridgell2-0/+86
(This used to be commit aeca07659aa612bee0c4dd6bdbb24c799e912909)
2007-10-10r22959: cope with a rather interesting interaction between epoll() andAndrew Tridgell1-1/+41
fork(). See http://junkcode.samba.org/ftp/unpacked/junkcode/epoll_fork.c for why this is needed (This used to be commit 6d06132ea9c5a1c7d098ba13f4146dc60e811e44)
2007-10-10r22830: merged the latest lib/events updates from ctdb to Samba4. ThisAndrew Tridgell9-8/+74
includes a new EVENT_FD_AUTOCLOSE flag that prevents race conditions where code using fd events might close a fd before releasing the struct fd_event. That causes headaches for epoll. (This used to be commit f1ad216de13b154a1f8747a44b0970dcc47a784a)
2007-10-10r22661: optimize the handling of directly triggered timed events:Stefan Metzmacher6-48/+60
- if someone adds a timed_event with a zero timeval we now avoid serval gettimeofday() calls and the event handler doesn't get the current time when it's called, instead we also pass a zero timeval - this also makes sure multiple timed events with a zero timeval are processed in the order there're added. the little benchmark shows that processing 2000000 directly timed events is now much faster, while avoiding syscalls at all! > time ./evtest (with the old code) real 0m6.388s user 0m1.740s sys 0m4.632s > time ./evtest (with the new code) real 0m1.498s user 0m1.496s sys 0m0.004s metze@SERNOX:~/devel/samba/4.0/samba4-ci/source> cat evtest.c #include <stdio.h> #include <stdint.h> #include <sys/time.h> #include <talloc.h> #include <events.h> static void dummy_fde_handler(struct event_context *ev_ctx, struct fd_event *fde, uint16_t flags, void *private_data) { } static void timeout_handler(struct event_context *ev, struct timed_event *te, struct timeval tval, void *private_data) { uint32_t *countp = (uint32_t *)private_data; (*countp)++; if (*countp > 2000000) exit(0); event_add_timed(ev, ev, tval, timeout_handler, countp); } int main(void) { struct event_context *ev; struct timeval tval = { 0, 0 }; uint32_t count = 0; ev = event_context_init(NULL); event_add_fd(ev, ev, 0, 0, dummy_fde_handler, NULL); event_add_timed(ev, ev, tval, timeout_handler, &count); return event_loop_wait(ev); } (This used to be commit 4db64b4ce2320b88d648078cbf86385f6fb44f1f)
2007-10-10r22634: make the events system much less dependent on the samba4 build systemAndrew Tridgell8-21/+69
(This used to be commit b0c8c1cd21e3f91431504d70a4bc0d3c6dee6071)
2007-10-10r22632: merged volkers select events fixAndrew Tridgell1-1/+2
(This used to be commit 216aa06fe634f98dce3f157e67303e90ddb70e2d)
2007-10-10r21299: Fix the build for those that don't have talloc.h installed.Jelmer Vernooij1-1/+1
(This used to be commit e782035251fd3d51a7a4221d107519fb1ba70ba7)
2007-10-10r21297: Remove the GTK+ tools and library from the main repository. They are ↵Jelmer Vernooij2-0/+4
now maintained separately in bzr at http://people.samba.org/bzr/jelmer/samba-gtk This also adds some more headers to the list that is installed and a couple of extra #include lines so these headers can be used externally without problems. (This used to be commit 07652f65ce7a5b19130f1a27cbf0e1e5fae13454)
2007-10-10r21212: detect if the kernel does not support integrated epoll/aio when theAndrew Tridgell1-1/+11
event context is created. This allows the LOCAL-EVENT test to pass on systems with have libaio but not the necessary kernel patches (This used to be commit 2ff8abf0022824e6ae93019ee1b3391e651a8ee7)
2007-10-10r21171: fixed a bug related to recursive event handling.Andrew Tridgell4-11/+7
If this happens: - two sockets are readable, and select/epoll/aio returns both of them - read event on socket1 is called - inside that read event an event_loop_once is called, this returns that socket2 is readable - read event on socket2 is called - event_loop_once returns - top level event handler then calls read event on socket2 (as it still has that listed as readable) - read handler for socket2 returns zero byte read, which is interpreted as end of file - socket is incorrectly closed this happened with ctdb, but it could happen anywhere (just rarely). The fix is trivial - ensure we break out of the event loop when we have been called recursively. (This used to be commit e042002bb5ee8974220e1ade56b64389571f75a6)
2007-10-10r20989: don't mark epoll as set until after the io_submit() succeedsAndrew Tridgell1-1/+1
this is part of the solution to LOCAL-EVENT on fort (This used to be commit 35f62bc12559e355d4ac73018afe255ea7c5866b)
2007-10-10r20984: Try to ensure we can't have sig_state dissapear before se.Andrew Bartlett1-0/+5
I think this happens when both are eventual children of the autofree context. (Trying to track down a valgrind error on fort). Andrew Bartlett (This used to be commit aee751497ca738fa0de72dd0748590a74d5af2fd)
2007-10-10r20960: attempt to fix a valgrind error in the signals backend.Andrew Tridgell1-38/+48
This also reduces the static data in the signal backend when not using signals to 4 bytes. (This used to be commit 071a6e8eb1861b10b8a7aa61470f21a546ffa0ca)
2007-10-10r20941: avoid races in the block/unblock codeAndrew Tridgell1-3/+11
(This used to be commit 83353ec0cd05464abb581f51d8c26ade7f0876fe)
2007-10-10r20940: allow SA_SIGINFO signals to be oneshot. Why you would ever want thisAndrew Tridgell1-0/+3
is beyond me :-) (This used to be commit e892cbdb4bb0779f8abb0902bee4a2e79456808d)
2007-10-10r20939: reduce the amount of static state for signal handlers from 96k to 1.2kAndrew Tridgell1-4/+23
(This used to be commit bf060ce4fe3b58fc3e58214490c4da9c6644c365)
2007-10-10r20938: use a double counter trick to avoid the need for atomic incrementAndrew Tridgell1-10/+31
(This used to be commit 7c7b79ed042abebc48d8eaa71c252df3200a84d9)
2007-10-10r20934: I *hate* deep indents :-)Volker Lendecke1-26/+28
(This used to be commit c98dd55e32a1d2df016e7a4deba218cd54efcdd2)
2007-10-10r20930: use sigaction() instead of signal()Andrew Tridgell4-11/+87
add support for sa_flags argument to event_add_signal(). These are passed to sigaction(). Special handling is provided for SA_RESETHAND (which tells the event system to remove the handler after the signal) and SA_SIGINFO which allows the siginfo structure to be received per signal (This used to be commit 1bb10b6cf7d717ad21834e73a4ca4b22b5fb6f0a)
2007-10-10r20929: fixed typoAndrew Tridgell1-4/+4
(This used to be commit bad87e2c82208646c331507d3999a3311ed153d9)
2007-10-10r20928: added signal events to lib/eventsAndrew Tridgell10-2/+261
Jeremy asked for this to allow Samba3 to use the Samba4 events library see torture/local/event.c for an example (This used to be commit 7e105482ff9a3da6b4708ff99a64f1881614fc5f)
2007-10-10r20794: hopefully fix the build on systems without native linux aioStefan Metzmacher1-1/+1
metze (This used to be commit 4787b8e1f7a7bb6b1e0f8ca64a27e4c5e6f53c2c)
2007-10-10r20788: - remove epoll configure checks from libreplaceStefan Metzmacher3-17/+15
- fix epoll configure checks for the epoll and aio events backends - we should only activate the epoll backend if sys/epoll.h and epoll_create() are found - we should only activate the aio backend if sys/epoll.h, epoll_create(), libaio.h and io_getevents() are found hopefully fix the build on 'bnhtest' in the build farm... metze (This used to be commit d46a5efb03ea1df50567cad00e1589870cdb31fe)
2007-10-10r20787: a subsystem doesn't need explicit dependencies to its modulesStefan Metzmacher1-1/+1
metze (This used to be commit 017cf3f13799b03e0aef995bc4fa9ae74bc1acb7)
2007-10-10r20623: change where the smb.conf parm event:backend is checked to ensure itAndrew Tridgell1-4/+6
affects all event_context_init() calls (This used to be commit 803e6cf6ef5caaf7c9faefcc111c97e1a97e9b82)