1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-31 12:23:52 +03:00
Commit Graph

48 Commits

Author SHA1 Message Date
Stefan Metzmacher
017cf3f137 r20787: a subsystem doesn't need explicit dependencies to its modules
metze
2007-10-10 14:40:55 -05:00
Andrew Tridgell
803e6cf6ef r20623: change where the smb.conf parm event:backend is checked to ensure it
affects all event_context_init() calls
2007-10-10 14:37:16 -05:00
Andrew Tridgell
4a8e07286f r20621: - enable the aio events backend on systems that support it
- allow the events backend to be chosen in smb.conf
2007-10-10 14:37:15 -05:00
Andrew Tridgell
c8bd3ec09d r20540: darn, also need to fix this event_context reference 2007-10-10 14:36:50 -05:00
Andrew Tridgell
934f18283d r20539: - split the common timer related events code into events_timed.c
- make it easier to plug in a new events backend

- add simpler 'select' and 'epoll' backends

This is part of the effort to add good AIO support. The events_aio.c
backend is done, but sometimes dies with a SEGV, which is why it isn't
enabled yet.
2007-10-10 14:36:50 -05:00
Andrew Tridgell
195051fdee r20104: this is a alternative events backend, which uses a hybrid of aio and
epoll. It is not linked in anywhere yet - I'm committing it in case
anyone else wants to have a look at it.

The concept is quite strange really, but it seems to be the only way
that Linux 2.6.x can currently use a unified event model allowing for
AIO events and socket events to be waited for by a single unified
event wait function. You setup a epoll system, then setup a weird aio
event that points at the epoll system, then use io_getevents() to
actually do the waiting.

I'm hoping that kevents or a proper integration of epoll will allow us
to avoid ths rather hackish scheme, but meanwhile this is the only
path to proper AIO in Samba on Linux (without a horrible signals mess)

(NOTE: this code requires some kernel patches to work at the moment)
2007-10-10 14:29:06 -05:00
Jelmer Vernooij
f7afa1cb77 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
2007-10-10 14:16:54 -05:00
Andrew Tridgell
61c6100617 r15854: more talloc_set_destructor() typesafe fixes 2007-10-10 14:08:32 -05:00
Jelmer Vernooij
adc8a019b6 r15207: Introduce PRIVATE_DEPENDENCIES and PUBLIC_DEPENDENCIES as replacement
for REQUIRED_SUBSYSTEMS.
2007-10-10 14:04:18 -05:00
Jelmer Vernooij
51b4270513 r14542: Remove librpc, libndr and libnbt from includes.h 2007-10-10 13:58:42 -05:00
Jelmer Vernooij
9c37f847d3 r14477: Remove the NOPROTO property - it's no longer used as proto.h is gone. 2007-10-10 13:57:30 -05:00
Jelmer Vernooij
aac1b99b36 r13842: Make some more functions public. 2007-10-10 13:52:15 -05:00
Andrew Tridgell
71eb159f9c r13699: restore the system/select.h include, as otherwise we don't detect
epoll support
2007-10-10 13:52:06 -05:00
Stefan Metzmacher
75a98047d6 r12844: don't include system headers directly
metze
2007-10-10 13:50:05 -05:00
Jelmer Vernooij
b24f2583ed r12498: Eliminate INIT_OBJ_FILES and ADD_OBJ_FILES. We were not using
the difference between these at all, and in the future the
fact that INIT_OBJ_FILES include smb_build.h will be sufficient to
have recompiles at the right time.
2007-10-10 13:47:45 -05:00
Stefan Metzmacher
f26c28a3ae r12153: work arround the fact that epoll reports EPOLLERR and EPOLLHUP, even if
you don't ask for.

with this patch the epoll mode behaves like the select mode

metze
2007-10-10 13:47:15 -05:00
Stefan Metzmacher
cf733e2684 r12146: as epoll notifies EPOLLERR and EPOLLHUP implicit,
let our code make it explicit, to make it clear

metze
2007-10-10 13:47:14 -05:00
Stefan Metzmacher
de322ea8b7 r12141: - move epoll related code into one big #ifdef, and use dummy #define's
for the case where, epoll isn't available at compile time
- only pass the private std_event_context, to the local function,
  to get rid of the talloc_get_type() calls
- use the private pointer to std_event_context_init() to decide if we want to
  disable epoll at runtime

metze
2007-10-10 13:47:14 -05:00
Stefan Metzmacher
a5cc0758a3 r12140: - add an additional_flags field to the fd_event struct, so that
the events backend can store private flags
- add function to access the gtk event loop ops struct

metze
2007-10-10 13:47:13 -05:00
Stefan Metzmacher
62c4ae8dde r12124: we don't need this comment twice
metze
2007-10-10 13:47:11 -05:00
Stefan Metzmacher
1dd5bb60a5 r12123: handle fde == NULL at the correct level
metze
2007-10-10 13:47:11 -05:00
Jelmer Vernooij
24e1030090 r11244: Relative path names in .mk files 2007-10-10 13:45:06 -05:00
Jelmer Vernooij
7fffc5c917 r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html) 2007-10-10 13:45:03 -05:00
Volker Lendecke
df8eeb01f4 r10690: Fix a bug that metze pointed out: Leaving the "rejecting" destructor around
prevents the memory from being freed.

Thanks,

Volker
2007-10-10 13:39:19 -05:00
Volker Lendecke
e38e50127a r10684: Add a nasty hack for the failure case of wbinfo -t. Tridge has a proper fix
for it pending.

Also fix a bug with timed events: Don't call the same event recursively in the
handler's inner semi-async event loop.

Volker
2007-10-10 13:39:18 -05:00
Jelmer Vernooij
b53313dc51 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
2007-10-10 13:39:08 -05:00
Stefan Metzmacher
495996cfc4 r10537: - we now use a much nicer way to handle talloc_free(timed_event)
the events code replaces a destructor to one that returns allways -1
  while it's calling the event handler
- we don't need the composite and winsrepl specific fixes any more
- this also fixes the problem with smbcli, dcerpc, cldap, ldap and nbt
  request timeouts

metze
2007-10-10 13:39:03 -05:00
Jelmer Vernooij
4f0d7f75b9 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
2007-10-10 13:38:30 -05:00
Andrew Tridgell
9c23008221 r9703: r9683@blu: tridge | 2005-08-27 18:56:05 +1000
added a comment about event_context_find()
2007-10-10 13:34:51 -05:00
Andrew Tridgell
b3d491b210 r9702: r9680@blu: tridge | 2005-08-27 18:45:08 +1000
- fixed ncacn_ip_tcp to use the generic async name resolution methods,
   so NBT names now work (as requested several times by abartlet!)

 - changed resolve_name() to take an event_context, so it doesn't cause
   the whole process to block

 - cleaned up the talloc_find_parent_bytype() calls to go via a cleaner
   event_context_find() call
2007-10-10 13:34:51 -05:00
Volker Lendecke
6f5bd76021 r8886: Exchange the arguments of timeval_compare, this makes it behave like strcmp.
Volker
2007-10-10 13:30:15 -05:00
Volker Lendecke
525d75dd24 r8875: Rename timeval_diff to timeval_until and revert the arguments. timeval_diff is
not strictly a subtraction function, there can't be negative timevals.

Volker
2007-10-10 13:30:14 -05:00
Andrew Tridgell
01e5aa1464 r8409: fixed another error found on netbsd.
some of our torture code does its own timeout processing, which means
there is no event timer in the event context. To fix this gererically
I have added a 30 second timout to all select/epoll calls so the
callers timeout loop is guaranteed to run eventually
2007-10-10 13:22:59 -05:00
Andrew Tridgell
5170288707 r6968: fixed a typo in the event macros. I'm surprised this one didn't show up earlier! 2007-10-10 13:17:01 -05:00
Andrew Tridgell
568b9175f3 r6147: The maxfd was being recalculated on every event loop, which made us
less scalable. It only needs to be recalculated when we the highest fd
is destroyed.
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
2e1e8db6dc r5437: Allow Samba4 to be compiled by tcc (www.tinycc.org). It still crashes when linking though. 2007-10-10 13:10:45 -05:00
Stefan Metzmacher
b3d0a410ef r5407: - this patch makes samba's event loop code more generic and makes
using other implementations possible. This will be mostly usefull
  for client apps which have there own event loop and want to
  use our client libs

- add a example plugin for liboop (see http://liboop.org)
  NOTE: this just compiles and is completly untested
        and is commited only as example

metze
2007-10-10 13:10:42 -05:00
Stefan Metzmacher
67bf637e9a r5393: trigger timed events not to early, better do it a bit to late
metze
2007-10-10 13:09:50 -05:00
Stefan Metzmacher
dd77ec754b r5373: prepare infrastructure for maing different events
implementations possible

metze
2007-10-10 13:09:48 -05:00
Andrew Tridgell
7c379590b4 r5370: epoll gives more precise event bits like EPOLLHUP instead of just EPOLLIN. We need to map
these to "read" events for the events code to work on errors like connection refused
(thanks to vl for noticing this bug)
2007-10-10 13:09:48 -05:00
Andrew Tridgell
9db6c79e90 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
2007-10-10 13:09:38 -05:00
Andrew Tridgell
6f79432fe6 r5296: - only include the tdb headers where they are needed
- removed the u32 hack in events.c as I think this was only needed as
  tdb.h defines u32. Metze, can you check that this hack is indeed no
  longer needed on your suse system?
2007-10-10 13:09:38 -05:00
Andrew Tridgell
e820fca506 r5292: ensure we cleanup the epoll_fd on event context destruction 2007-10-10 13:09:37 -05:00
Stefan Metzmacher
b4928f3ea8 r5284: this is needed on my server
+/* this #undef is needed on my SuSE 9.2 Box with glibc-devel-2.3.3-118 */
+#undef u32

as sys/epoll.h has this:
typedef union epoll_data
{
  void *ptr;
  int fd;
  uint32_t u32;
  uint64_t u64;
} epoll_data_t;

metze
2007-10-10 13:09:36 -05:00
Andrew Tridgell
34e1a3ad78 r5273: fixed another bug in the code that keeps timed events
sorted. Hopefully it really works now :-)
2007-10-10 13:09:35 -05:00
Andrew Tridgell
d89b493aaf r5217: avoid epoll_ctl() if the event flags are already set correctly 2007-10-10 13:09:32 -05:00
Andrew Tridgell
2d7242f2ec r5198: don't consider failure to remove an epoll event as enough reason to
fallback to select(). This can happen in too many situations.
2007-10-10 13:09:30 -05:00
Andrew Tridgell
7f54c8a339 r5197: moved events code to lib/events/ (suggestion from metze) 2007-10-10 13:09:30 -05:00