summaryrefslogtreecommitdiff
path: root/source3/include/event.h
AgeCommit message (Collapse)AuthorFilesLines
2013-02-19s3:include: avoid TEVENT_COMPAT_DEFINESStefan Metzmacher1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19s3:nmbd: s/struct event_context/struct tevent_contextStefan Metzmacher1-3/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19s3:includes: remove event_context_init() define for s3_tevent_context_init()Stefan Metzmacher1-3/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2011-07-04s3-lib Move event_add_idle() to source3/lib/events.cAndrew Bartlett1-1/+9
This allows libauth not to depend on smbd_base. Andrew Bartlett
2011-03-30s3: try to fix the build on some non-linux buildfarm machines.Günther Deschner1-1/+1
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Mar 30 11:39:31 CEST 2011 on sn-devel-104
2011-02-28s3: Remove select-based s3 event backendVolker Lendecke1-5/+0
2011-02-28s3: Use poll for the event loopVolker Lendecke1-0/+5
2011-01-31Revert "s3:events: Call all ready fd event handlers on each iteration of the ↵Stefan Metzmacher1-1/+1
main loop" This reverts commit 455fccf86b6544cd17a2571c63a88f8aebff3f74. I'll add a more generic fix for this problem. metze
2010-12-23All calls to event_add_to_select_args() call GetTimeOfDay() andJeremy Allison1-1/+0
pass this in as the &now parameter. Push this call inside of event_add_to_select_args() to the correct point so it doesn't get called unless needed. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Dec 23 01:08:11 CET 2010 on sn-devel-104
2010-10-01s3:events: Call all ready fd event handlers on each iteration of the main loopSteven Danneman1-1/+1
Previously, only one fd handler was being called per main message loop in all smbd child processes. In the case where multiple fds are available for reading the fd corresponding to the event closest to the beginning of the event list would be run. Obviously this is arbitrary and could cause unfairness. Usually, the first event fd is the network socket, meaning heavy load of client requests can starve out other fd events such as oplock or notify upcalls from the kernel. In this patch, I have changed the behavior of run_events() to unset any fd that it has already called a handler function, as well as decrement the number of fds that were returned from select(). This allows the caller of run_events() to iterate it, until all available fds have been handled. I then changed the main loop in smbd child processes to iterate run_events(). This way, all available fds are handled on each wake of select, while still checking for timed or signalled events between each handler function call. I also added an explicit check for EINTR from select(), which previously was masked by the fact that run_events() would handle any signal event before the return code was checked. This required a signature change to run_events() but all other callers should have no change in their behavior. I also fixed a bug in run_events() where it could be called with a selrtn value of -1, doing unecessary looping through the fd_event list when no fds were available. Also, remove the temporary echo handler hack, as all fds should be treated fairly now.
2010-03-26s3-event: switch s3 to using tevent_re_initialise()Andrew Tridgell1-1/+0
This correctly initialises the event backend, and checks for errors (thanks to Metze for suggesting this)
2010-03-14s3: Remove some unused codeVolker Lendecke1-4/+0
2009-01-05s3:events: register as tevent backendStefan Metzmacher1-27/+5
metze
2009-01-05s3:events: get rid of the stupid set_event_dispatch_time() functionStefan Metzmacher1-2/+0
metze
2009-01-05s3:events: get rid of the stupid cancel_named_event() functionStefan Metzmacher1-2/+0
metze
2009-01-05s3:events: change event_add_timed() prototype to match samba4Stefan Metzmacher1-2/+4
metze
2009-01-05s3:events: move prototypes to event.hStefan Metzmacher1-0/+44
metze
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r20931: This changes the notify infrastructure from a polling-based to an ↵Volker Lendecke1-5/+0
event-driven based approach. The only remaining hook into the backend is now void *(*notify_add)(TALLOC_CTX *mem_ctx, struct event_context *event_ctx, files_struct *fsp, uint32 *filter); (Should we put this through the VFS, so that others can more easily plug in?) The trick here is that the backend can pick filter bits that the main smbd should not handle anymore. Thanks to tridge for this idea. The backend can notify the main smbd process via void notify_fsp(files_struct *fsp, uint32 action, char *name); The core patch is not big, what makes this more than 1800 lines are the individual backends that are considerably changed but can be reviewed one by one. Based on this I'll continue with inotify now. Volker (This used to be commit 9cd6a8a82792b7b6967141565d043b6337836a5d)
2007-10-10r20846: Before this gets out of control...Volker Lendecke1-9/+8
This add a struct event_context and infrastructure for fd events to smbd. This is step zero to import lib/events. Jeremy, I rely on you to watch the change in receive_message_or_smb() closely. For the normal code path this should be the only relevant change. The rest is either not yet used or is cosmetic. Volker (This used to be commit cd07f93a8aecb24c056e33b1ad3447a41959810f)
2007-10-10r13316: Let the carnage begin....Gerald Carter1-0/+31
Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)