Age | Commit message (Collapse) | Author | Files | Lines |
|
Guenther
|
|
Guenther
|
|
Guenther
|
|
Guenther
|
|
Guenther
|
|
|
|
|
|
This is required because the deferred connect code skips the connect()
until sending the packet, but unless we catch this call, the connect()
never happens.
Andrew Bartlett
|
|
This adds 3 simple speed tests to tdbtool, for transaction store,
store and fetch.
On my laptop this shows transactions costing about 10ms
|
|
On my Linux box, this is definitely the more reliable strategy with unix domain
sockets, and according to my tests it also works correctly with TCP sockets.
|
|
A socket where the other side has closed only becomes readable. To catch
errors early when sitting in a pure writev, we need to also test for
readability.
|
|
|
|
metze
|
|
|
|
Guenther
|
|
Guenther
|
|
tevent_add_fd does not properly set that. At least in epoll and select this is
the only error condition.
Metze, please check!
|
|
Remove two indentation levels by returning early on error.
Metze, please check!
|
|
targets
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
|
|
with released versions of talloc.
|
|
This module didn't have any functionality that we actually used yet, and
it was quite small.
Tevent is quite low level and perhaps doesn't make much sense to expose
directly as a Python module. It was also causing build problems when used with a
system-tevent. We can always back later if necessary.
|
|
This is not ideal, but at least it fixes the build of samba-gtk for now.
I've also added a warning about API guarantees at the top of the header.
|
|
(e.g. Debian GNU/kFreeBSD)
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
|
|
|
|
either (from Samba).
|
|
|
|
|
|
|
|
- Now that we initialize for the non-thread-safe case in the macro, there's no
need to do it here too.
Derrell
|
|
- Create separate macros for lock and unlock so that it's easier to identify
which request is being made.
- Initialize *ponce in the SMB_THREAD_ONCE macro in the non-thread-safe case,
rather than requiring each init function to determine if it's in the
non-thread-safe case and manually initialize.
Derrell
|
|
- This should make life easier for ourselves. We're no longer constrained to
the semantics of pthread_once, so let's allow passing a parameter to the
initialization function. Some of Samba's init functions return a
value. Although I haven't searched, I suspect that some of the init
functions require in input parameters. The parameter added here can be used
for input, output, or both, as necessary... or ignored, as is now done in
talloc_stackframe_init().
Derrell
|
|
- It would help if smb_thread_once did, eventually, set the variable that
prevents the init function from being run again. Sigh. It must be getting
late.
Derrell
|
|
- We can't set *ponce=true before running the function because although other
threads wouldn't re-run the initialization function, they could potentially
proceed beyond the initialization point while the first thread was still
running the initialization function. If a second thread gets to an
SMB_THREAD_ONCE() call while one with the same ponce is running, we need to
ensure that it enters smb_thread_once() to await the mutex and then recheck
whether *ponce is set or not. My original comment about other "once"
functions possibly being called from within this "once" function is
irrelevant since those other ones would have their own unique ponce.
Derrell
|
|
it's used in a ? : comparison macro.
Jeremy.
|
|
Jeremy.
|
|
|
|
- The macro SMB_THREAD_ONCE now tests whether the "once" variable is already
set, and if so avoids calling smb_thread_once().
Derrell
|
|
- It's a serious error if we can't lock or unlock a mutex in
smb_thread_once(). Panic instead of just displaying a DEBUG message.
Derrell
|
|
- Internally, when locking or unlocking a mutex, we'll pass one of the
values of enum smb_thread_lock_type. That enum is not available to users
providing a thread implementation. Externally, we'll document the integer
values which will be passed to their lock_mutex function, but not require
them to access our internal header file.
Derrell
|
|
Jeremy, please check...
- I'm in the process of providing an interface in libsmbclient to the
recently-added threading capabilities. In the process, I discovered that
different thread implementations have varying types for the variable passed
to the thread_impl_once() function. pthreads, for example, uses type
pthread_once_t. Since Samba needs to internally declare these variables, it
would need to know the exact type required by each thread implementation's
function. After considering multiple methods of obtaining an appropriately
sized variable, I decided that for the basic "once" functionality required
by Samba, it would be much simpler to just implement our own "once"
functionality. We don't require cancellation points et all. This commit adds
an smb_thread_once() function that is implemented using an internal
mutex. The mutex itself uses the implementation's create_mutex
function. This eliminates the need for the user to provide a smb_thread_once
function pointer and the entire issue of that function's first parameter.
Derrell
|
|
metze
|
|
stylesheets if they are installed.
|
|
|
|
|
|
|
|
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|