search for: pthread_mutex_init

Displaying 20 results from an estimated 86 matches for "pthread_mutex_init".

2005 Jan 18
1
libshout error with pthread_mutex_init using Shout.pm
Any idea what might cause this error to happen on a FreeBSD 4.9 machine trying to use Shout.pm with perl 5.8.5 ? /usr/libexec/ld-elf.so.1: /usr/local/lib/libshout.so.3: Undefined symbol "pthread_mutex_init"
2011 Feb 13
0
[LLVMdev] Code/comment seems not synchronized in Mutex.cpp and RWMutex.cpp
...cpp. In these files there are: // This variable is useful for situations where the pthread library has been // compiled with weak linkage for its interface symbols. This allows the // threading support to be turned off by simply *not linking against -lpthread*. // In that situation, the value of *pthread_mutex_init* will be 0 and // consequently pthread_enabled will be false. In such situations, all the // ... static const bool pthread_enabled = *true*; But pthread_enabled has no relation with pthread_mutex_init. I've check the log, pthread_enabled has been assigned to true since 2006. It was: stati...
2003 Jun 19
0
flashpluginwrapper for Flash 6 (Shared Library Tools redux)
...t (__filedesc, __stat_buf); } int __xstat(int __ver, const char *__filename, struct stat *__stat_buf) { return stat (__filename, __stat_buf); } I installed this new version of flashpluginwrapper, installed the linux-flashplugin6 library in browser_plugins. Now, the Flash 6 code segfaults in pthread_mutex_init(), called from Program received signal SIGSEGV, Segmentation fault. 0x284549d6 in pthread_mutex_init () from /usr/lib/libc_r.so.4 (gdb) bt #0 0x284549d6 in pthread_mutex_init () from /usr/lib/libc_r.so.4 #1 0x298016b0 in MPCriticalSection::MPCriticalSection () from /usr/X11R6/lib/browser_plu...
2011 Nov 11
1
[RFC] kvm tools: Implement multiple VQ for virtio-net
...ueue]); + pthread_cond_signal(&ndev->io_cond[queue]); + mutex_unlock(&ndev->io_lock[queue]); } static bool virtio_net__tap_init(const struct virtio_net_params *params, @@ -248,14 +245,17 @@ fail: static void virtio_net__io_thread_init(struct kvm *kvm, struct net_dev *ndev) { - pthread_mutex_init(&ndev->io_tx_lock, NULL); - pthread_mutex_init(&ndev->io_rx_lock, NULL); + int i; - pthread_cond_init(&ndev->io_tx_cond, NULL); - pthread_cond_init(&ndev->io_rx_cond, NULL); + for (i = 0; i < ndev->vq_num; i++) { + pthread_mutex_init(&ndev->io_lock[i], NU...
2011 Nov 11
1
[RFC] kvm tools: Implement multiple VQ for virtio-net
...ueue]); + pthread_cond_signal(&ndev->io_cond[queue]); + mutex_unlock(&ndev->io_lock[queue]); } static bool virtio_net__tap_init(const struct virtio_net_params *params, @@ -248,14 +245,17 @@ fail: static void virtio_net__io_thread_init(struct kvm *kvm, struct net_dev *ndev) { - pthread_mutex_init(&ndev->io_tx_lock, NULL); - pthread_mutex_init(&ndev->io_rx_lock, NULL); + int i; - pthread_cond_init(&ndev->io_tx_cond, NULL); - pthread_cond_init(&ndev->io_rx_cond, NULL); + for (i = 0; i < ndev->vq_num; i++) { + pthread_mutex_init(&ndev->io_lock[i], NU...
2017 Nov 17
0
[nbdkit PATCH 3/6] connections: Add read/write lock over client I/O
...ion structure. */ struct connection { pthread_mutex_t request_lock; + pthread_mutex_t read_lock; + pthread_mutex_t write_lock; void *handle; void *crypto_session; @@ -206,6 +208,8 @@ new_connection (int sockin, int sockout) conn->sockin = sockin; conn->sockout = sockout; pthread_mutex_init (&conn->request_lock, NULL); + pthread_mutex_init (&conn->read_lock, NULL); + pthread_mutex_init (&conn->write_lock, NULL); conn->recv = raw_recv; conn->send = raw_send; @@ -223,6 +227,8 @@ free_connection (struct connection *conn) conn->close (conn); p...
2019 Apr 12
1
gencache.tdb: device busy
...> > I confirmed in 4.10.2, it happens: > > winbindd.log:  tdb(/tmw-nas-3p/samba/var/lock/gencache.tdb): tdb_open_ex: tdb_mutex_init failed for /tmw-nas-3p/samba/var/lock/gencache.tdb: Device busy > > So either apply OS fix, or apply a software fix (zeroing pthread_mutex_t before pthread_mutex_init()).   This all should be based on the following issue:   https://www.illumos.org/issues/9959   As far as I understand the issue making an software fix in samba for the OS seems more reasonable since the problem can occur sporadic and thus again... Could you tell me how to help to fix that bug?    ...
2017 Nov 17
8
[RFC nbdkit PATCH 0/6] Enable full parallel request handling
I want to make my nbd forwarding plugin fully parallel - but to do that, I first need to make nbdkit itself fully parallel ;) With this series, I was finally able to demonstrate out-of-order responses when using qemu-io (which is great at sending back-to-back requests prior to waiting for responses) coupled with the nbd file plugin (which has a great feature of rdelay and wdelay, to make it
2012 Jan 14
2
[LLVMdev] Unreachable code in Mutex.cpp
...n libpthreads.  The idea of this check is thus to detect if pthreads is linked into the app and enable threads if so. Sorry, right - I should've been more clear. I understand that that's what the declaration/boolean used to do: static const bool pthread_enabled = static_cast<bool>(pthread_mutex_init); But that's not what the code does now - the change you made 5 years ago changed it to a constant: static const bool pthread_enabled = true; (I found this because the return outside the 'if (pthread_unabled) { ... return }' was marked as unreachable by -Wunreachable-code). Since it...
2017 Nov 17
2
Re: [nbdkit PATCH 3/6] connections: Add read/write lock over client I/O
...read_mutex_t request_lock; > + pthread_mutex_t read_lock; > + pthread_mutex_t write_lock; > void *handle; > void *crypto_session; > > @@ -206,6 +208,8 @@ new_connection (int sockin, int sockout) > conn->sockin = sockin; > conn->sockout = sockout; > pthread_mutex_init (&conn->request_lock, NULL); > + pthread_mutex_init (&conn->read_lock, NULL); > + pthread_mutex_init (&conn->write_lock, NULL); > > conn->recv = raw_recv; > conn->send = raw_send; > @@ -223,6 +227,8 @@ free_connection (struct connection *conn) &...
2005 Jul 13
1
[LLVMdev] FreeBSD build broken
FreeBSD does not define pthread_mutexattr_setpshared: gmake[1]: Entering directory `/usr/home/jeffc/llvm/obj/lib/System' llvm[1]: Compiling Mutex.cpp for Release build /usr/home/jeffc/llvm/obj/../lib/System/Mutex.cpp:42: warning: the address of `int llvm::pthread_mutex_init(llvm::pthread_mutex**, llvm::pthread_mutex_attr* const*)', will always evaluate as `true' /usr/home/jeffc/llvm/obj/../lib/System/Mutex.cpp: In constructor `llvm::sys::Mutex::Mutex(bool)': /usr/home/jeffc/llvm/obj/../lib/System/Mutex.cpp:66: error: `pthread_mutexattr_setpshared' u...
2010 Jun 15
2
Remote X connection to CentOS 5.5 using Xming -ac
...00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32 glWinInitVisuals:1596: glWinInitVisuals glWinInitVisualConfigs:1503: glWinInitVisualConfigs glWinSetVisualConfigs:1581: glWinSetVisualConfigs init_visuals:1055: init_visuals null screen fn ReparentWindow null screen fn RestackWindow InitQueue - Calling pthread_mutex_init InitQueue - pthread_mutex_init returned InitQueue - Calling pthread_cond_init InitQueue - pthread_cond_init returned winInitMultiWindowWM - Hello winInitMultiWindowWM - Calling pthread_mutex_lock () winMultiWindowXMsgProc - Hello winMultiWindowXMsgProc - Calling pthread_mutex_lock () glWinScreenPro...
2012 Jan 14
0
[LLVMdev] Unreachable code in Mutex.cpp
...his check is thus to detect if pthreads is linked into the app and enable threads if so. > > Sorry, right - I should've been more clear. I understand that that's > what the declaration/boolean used to do: > > > static const bool pthread_enabled = static_cast<bool>(pthread_mutex_init); > > But that's not what the code does now - the change you made 5 years > ago changed it to a constant: > > static const bool pthread_enabled = true; > > (I found this because the return outside the 'if (pthread_unabled) { > ... return }' was marked as unrea...
2006 Apr 17
3
[LLVMdev] OpenBSD. (Was: 1.7 Pre-Release Ready for Testing)
...reeBSD" llvm_cv_platform_type="Unix" ;; So I forged `freebsd' $ ./configure --build=i386-unknown-freebsd3.8 and ./configure completed successfully. gmake stopped with llvm[1]: Compiling Mutex.cpp for Debug build Mutex.cpp:55: warning: the address of `int pthread_mutex_init(volatile pthread_mutex**, pthread_mutex_attr* const*)', will always be `true' Mutex.cpp: In constructor `llvm::sys::Mutex::Mutex(bool)': Mutex.cpp:80: error: `pthread_mutexattr_setpshared' undeclared (first use this function) Mutex.cpp:80: error: (Each unde...
2012 Mar 11
2
[patch] Threading support in ssh-agent
...dlist); + TAILQ_INIT(&(idtable[i].idlist)); idtable[i].nentries = 0; } } @@ -355,6 +407,224 @@ datafellows = odatafellows; } +#ifdef HAVE_LIBPTHREAD + +int +req_queue_init(struct AuthRequestQueue* q, int inprogress_initial) +{ + memset(q, 0, sizeof(struct AuthRequestQueue)); + + if (pthread_mutex_init(&(q->lock), 0)) { + error("pthread_mutex_init(queue): %s", strerror(errno)); + return -1; + } + if (pthread_cond_init(&(q->cond), 0)) { + error("pthread_cond_init(queue): %s", strerror(errno)); + return -1; + } + q->inprogress = inprogress_initial; + return...
2009 Mar 18
3
[LLVMdev] Status of LLVM's atomic intrinsics
...ow = %d Condition signal received.\n", my_id, count); } pthread_mutex_unlock(&count_mutex); pthread_exit(NULL); } int main (int argc, char *argv[]) { int i, rc; pthread_t threads[1+NUM_THREADS]; pthread_attr_t attr; /* Initialize mutex and condition variable objects */ pthread_mutex_init(&count_mutex, NULL); pthread_cond_init (&count_threshold_cv, NULL); /* For portability, explicitly create threads in a joinable state */ pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); pthread_create(&threads[0], &attr, watch...
2017 Nov 20
10
[nbdkit PATCH v2 0/8] Support parallel transactions within single connection
I've posted some of these patches or ideas before; but now I'm confident enough with the series that it should be ready to push; at any rate, I can now run test-socket-activation in a tight loop without triggering any crashes or hangs. With this in place, I'm going back to work on making the nbd forwarder wort with the parallel thread model. Eric Blake (8): sockets: Use
2004 Jul 30
1
Compiling * on OpenBSD 3.5
.../usr/src/asterisk/asterisk/include/asterisk/lock.h:299: undefined reference to `pthread_mutexattr_init' /usr/src/asterisk/asterisk/include/asterisk/lock.h:300: undefined reference to `pthread_mutexattr_settype' /usr/src/asterisk/asterisk/include/asterisk/lock.h:301: undefined reference to `pthread_mutex_init' sched.o: In function `sched_context_destroy': and /usr/lib/libssl.so.8.0: undefined reference to `BN_clear_free' /usr/lib/libssl.so.8.0: undefined reference to `X509_PURPOSE_set' /usr/lib/libssl.so.8.0: undefined reference to `d2i_X509_NAME' /usr/lib/libssl.so.8....
2014 Mar 13
2
[PATCH] nouveau: safen up nouveau_device list usage against concurrent access
...nged, 30 insertions(+), 2 deletions(-) diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c index ee7893b..72c31cf 100644 --- a/nouveau/nouveau.c +++ b/nouveau/nouveau.c @@ -85,6 +85,12 @@ nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev) if (!nvdev) return -ENOMEM; + ret = pthread_mutex_init(&nvdev->lock, NULL); + if (ret) { + free(nvdev); + return ret; + } + nvdev->base.fd = fd; ver = drmGetVersion(fd); @@ -161,6 +167,7 @@ nouveau_device_del(struct nouveau_device **pdev) if (nvdev->close) drmClose(nvdev->base.fd); free(nvdev->client); + pthread_mu...
2006 Apr 17
0
[LLVMdev] OpenBSD. (Was: 1.7 Pre-Release Ready for Testing)
...rm_type="Unix" ;; > >So I forged `freebsd' > > $ ./configure --build=i386-unknown-freebsd3.8 > >and ./configure completed successfully. gmake stopped with > > llvm[1]: Compiling Mutex.cpp for Debug build > Mutex.cpp:55: warning: the address of `int pthread_mutex_init(volatile > pthread_mutex**, pthread_mutex_attr* const*)', will always be `true' > Mutex.cpp: In constructor `llvm::sys::Mutex::Mutex(bool)': > Mutex.cpp:80: error: `pthread_mutexattr_setpshared' undeclared (first use this > function) > Mutex.cpp:8...