search for: pthread_rwlock_t

Displaying 20 results from an estimated 130 matches for "pthread_rwlock_t".

2010 Feb 14
2
[LLVMdev] [cfe-dev] clang with pthread on mingw
...p: >> >> // Initialize the rwlock >> errorcode = pthread_rwlock_init(rwlock, &attr); >> assert(errorcode == 0); >> >> >> on mingw platform, pthread only support NULL attribues as shown below: >> >> int >> pthread_rwlock_init (pthread_rwlock_t * rwlock, >> const pthread_rwlockattr_t * attr) >> { >> int result; >> pthread_rwlock_t rwl = 0; >> >> if (rwlock == NULL) >> { >> return EINVAL; >> } >> >> if (attr != NULL && *attr != NULL) >>...
2010 Feb 14
0
[LLVMdev] [cfe-dev] clang with pthread on mingw
...alize the rwlock >>> errorcode = pthread_rwlock_init(rwlock, &attr); >>> assert(errorcode == 0); >>> >>> >>> on mingw platform, pthread only support NULL attribues as shown below: >>> >>> int >>> pthread_rwlock_init (pthread_rwlock_t * rwlock, >>> const pthread_rwlockattr_t * attr) >>> { >>> int result; >>> pthread_rwlock_t rwl = 0; >>> >>> if (rwlock == NULL) >>> { >>> return EINVAL; >>> } >>> >>> if (attr != NUL...
2018 Jan 17
0
[PATCH 1/9] plugins: Move locking to a new file.
...ILITY OF + * SUCH DAMAGE. + */ + +#include <config.h> + +#include <stdio.h> +#include <stdlib.h> + +#include "internal.h" + +static pthread_mutex_t connection_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t all_requests_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_rwlock_t unload_prevention_lock = PTHREAD_RWLOCK_INITIALIZER; + +void +lock_connection (void) +{ + int thread_model = plugin_thread_model (); + + if (thread_model <= NBDKIT_THREAD_MODEL_SERIALIZE_CONNECTIONS) { + debug ("acquire connection lock"); + pthread_mutex_lock (&connection_l...
2018 Jan 16
0
[PATCH nbdkit 1/3] plugins: Move locking to a new file.
...ILITY OF + * SUCH DAMAGE. + */ + +#include <config.h> + +#include <stdio.h> +#include <stdlib.h> + +#include "internal.h" + +static pthread_mutex_t connection_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t all_requests_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_rwlock_t unload_prevention_lock = PTHREAD_RWLOCK_INITIALIZER; + +void +lock_connection (void) +{ + int thread_model = plugin_thread_model (); + + if (thread_model <= NBDKIT_THREAD_MODEL_SERIALIZE_CONNECTIONS) { + debug ("acquire connection lock"); + pthread_mutex_lock (&connection_l...
2004 Aug 06
0
icecast2 on solaris ... (fwd)
Ok, for further info, below is the full compiler output when running gnu make. The first error, ../thread/thread.h:78: parse error before `pthread_rwlock_t' is the one that brings on all the others. I've checked /usr/include/pthread.h and didn't find pthread_rwlock_t in it. So my guess is, pthread on solaris 2.6 is too old (afaik, there are three versions of solaris that are newer than this). Can somebody with solaris (newer than 2...
2023 Feb 22
1
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
...curl_lock_access access, void *userptr); +static void unlock_cb (CURL *handle, curl_lock_data data, + void *userptr); + +/* These locks protect access to the curl share data. See: + * https://gist.github.com/bagder/7eccf74f8b6d70b5abefeb7f288dba9b + */ +static pthread_rwlock_t lockarray[CURL_LOCK_DATA_LAST]; + +/* Curl share data. */ +static CURLSH *share; /* This lock protects access to the curl_handles vector below. */ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; @@ -90,18 +103,46 @@ static curl_handle_list curl_handles = empty_vector; static pthread_c...
2004 Aug 06
2
My turn to have issues with compiling libshout
...But when I ran make I got this: gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I./.. -g -O2 -Wp,-MD,.deps/avl.pp -c avl.c -fPIC -DPIC -o .libs/avl.lo In file included from ../stream.h:20, from ../config.h:17, from avl.c:33: ../thread/thread.h:90: syntax error before "pthread_rwlock_t" ../thread/thread.h:90: warning: no semicolon at end of struct or union ../thread/thread.h:91: warning: data definition has no type or storage class ../thread/thread.h:132: syntax error before '*' token ../thread/thread.h:133: syntax error before '*' token ../thread/thread.h:13...
2004 Aug 06
0
My turn to have issues with compiling libshout
...t; gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I./.. -g -O2 -Wp,-MD,.deps/avl.pp -c > avl.c > -fPIC -DPIC -o .libs/avl.lo > In file included from ../stream.h:20, > from ../config.h:17, > from avl.c:33: > ../thread/thread.h:90: syntax error before "pthread_rwlock_t" This is the key point, what system is this, and can you send me the config.log > I suspect this is another simptom of the threads stuff that's being worked > on. I suspect I'm missing something important, something configure wasn't > too bothered about however. yep, a...
2011 Mar 25
1
Can't build PHP 5.3.6 with MySQL 5.5.10 on CentOS-4
Hello, I'm trying to build PHP 5.3.6 in a CentOS-4 server with MySQL 5.5.10 and I get this error: //usr/include/mysql/my_config_i386.h:610:1: warning: "PACKAGE_NAME" redefined /usr/include/mysql/mysql/psi/mysql_thread.h:100: error: syntax error before "pthread_rwlock_t" /usr/include/mysql/mysql/psi/mysql_thread.h:100: warning: no semicolon at end of struct or union /usr/include/mysql/mysql/psi/mysql_thread.h:107: error: syntax error before '}' token /usr/include/mysql/mysql/psi/mysql_thread.h: In function `inline_mysql_rwlock_init': /usr/inclu...
2017 Nov 14
0
[PATCH 2/3] Avoid race conditions when nbdkit exits.
...free (conn); } diff --git a/src/plugins.c b/src/plugins.c index d2d0b39..f5056d9 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -48,6 +48,7 @@ static pthread_mutex_t connection_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t all_requests_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_rwlock_t unload_prevention_lock = PTHREAD_RWLOCK_INITIALIZER; /* Maximum read or write request that we will handle. */ #define MAX_REQUEST_SIZE (64 * 1024 * 1024) @@ -155,6 +156,11 @@ void plugin_cleanup (void) { if (dl) { + /* Acquiring this lock prevents any plugin callbacks from running +...
2018 Jan 19
1
[PATCH nbdkit] locks: Cache the plugin thread model.
..." +/* Note that the plugin's thread model cannot change after being + * loaded, so caching it here is safe. + */ +static int thread_model; + static pthread_mutex_t connection_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t all_requests_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_rwlock_t unload_prevention_lock = PTHREAD_RWLOCK_INITIALIZER; void -lock_connection (void) +lock_init_thread_model (void) { - int thread_model = backend->thread_model (backend); + thread_model = backend->thread_model (backend); +} +void +lock_connection (void) +{ if (thread_model <= NBDK...
2004 Aug 06
3
My turn to have issues with compiling libshout
On 13 Mar 2003, Karl Heyes wrote: > > ../thread/thread.h:90: syntax error before "pthread_rwlock_t" > > This is the key point, what system is this, and can you send me the > config.log This system is running Debian unstable and has the following auto* versions: automake (GNU automake) 1.4-p6 autoconf (GNU Autoconf) 2.57 Unstable has automake 1.4, 1.5, 1.6 and 1.7 available. Is...
2004 Aug 06
5
Stream with Ices2 sound very metallic
Hi, I don't know why, but the stream generated by ices sounds very metallic, compared to the radio, and compared to a stream of the same quality with darkice. I tried different parameters, but it doesn't change. My parameters are : <input> <module>oss</module> <param name="rate">44100</param> <!-- samplerate --> <param
2023 Feb 22
2
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
I'm mainly posting this to the list as a back-up. It does work, it does _not_ improve performance in any noticable way. However I'm having lots of trouble getting HTTP/2 to work (with or without this patch) and that's stopping me from testing anything properly. Rich.
2023 Feb 22
1
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
...cess, void *userptr); > +static void unlock_cb (CURL *handle, curl_lock_data data, > + void *userptr); > + > +/* These locks protect access to the curl share data. See: > + * https://gist.github.com/bagder/7eccf74f8b6d70b5abefeb7f288dba9b > + */ > +static pthread_rwlock_t lockarray[CURL_LOCK_DATA_LAST]; > + > +/* Curl share data. */ > +static CURLSH *share; > > /* This lock protects access to the curl_handles vector below. */ > static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; > @@ -90,18 +103,46 @@ static curl_handle_list curl_handle...
2018 Jan 16
4
[PATCH nbdkit v2 2/3] Refactor plugin_* functions into a backend
v1 -> v2: - Fixed everything mentioned in the review. Rich.
2005 Aug 22
2
ezstream and OSX 10.4.2 Tiger...
...ge.ss_family... yes checking for inet_pton... yes checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking for pthread_rwlock_t... yes checking for cc_r... gcc checking for libogg... ok checking for libvorbis... ok checking for struct ovectl_ratemanage_arg... no configure: error: requisite Ogg Vorbis library not found -- Michael Hale <smiley@gift-culture.org> gift culture: http://www.g...
2018 Jan 16
6
[PATCH nbdkit 0/3] Refactor plugin_* functions into a backend struct.
Somewhat invasive but mostly mechanical change to how plugins are called. This patch is in preparation for adding a second backend subtype for filters. Rich.
2007 Aug 24
0
getting stuck with OSX install
...ion required configure: WARNING: Theora disabled! checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking for pthread_rwlock_t... yes checking for cc_r... gcc checking for curl-config... /usr/bin/curl-config checking curl/curl.h usability... yes checking curl/curl.h presence... yes checking for curl/curl.h... yes checking for libcurl... yes checking whether CURLOPT_NOSIGNAL is declared... yes configure: creating ./config.s...
2019 Jul 21
2
Missing hivex.h error when compiling on macOS 10.14 (Mojave)
...he library search path... lib,lib checking whether imported symbols can be declared weak... no checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking for pthread_kill in -lpthread... yes checking for multithread API to use... posix checking for pthread_rwlock_t... yes checking whether pthread_rwlock_rdlock prefers a writer to a reader... yes checking for size_t... yes checking for working alloca.h... yes checking for alloca... yes checking for _set_invalid_parameter_handler... no checking for fcntl... yes checking for symlink... yes checking for getdtable...