search for: pthread_attr_init

Displaying 20 results from an estimated 27 matches for "pthread_attr_init".

2013 Feb 13
1
vorbis-tools 1.4.0, ogg123 and MinGW
...anything. On MinGW a pthread_t is defined as a struct not an int: typedef struct { void * p; unsigned int x; } ptw32_handle_t; typedef ptw32_handle_t pthread_t; The configure test to check if pthreads is available is: int main () { pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cancel(0); pthread_cleanup_pop(0); ; return 0; } It's assuming a pthread_t could be equal to 0 (an int) which fails when building with MinGW. I changed the code as follows and it at...
2011 Dec 13
1
Thread-safety issues with vbox driver ?
...nnectListDefinedDomains(conn, names, count); virDomainPtr *doms = malloc(count * sizeof(virDomainPtr)); for (i = 0 ; i < count ; ++i) { doms[i] = virDomainLookupByName(conn, names[i]); } pthread_t *threads = malloc(count * sizeof(pthread_t)); pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); for (i = 0 ; i < count ; ++i) { pthread_create(&threads[i], &attr, create_and_destroy, (void *)doms[i]); } pthread_attr_destroy(&attr); for (i = 0 ; i < count ; ++i) {...
2009 Mar 18
3
[LLVMdev] Status of LLVM's atomic intrinsics
...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_count, (void *)1); for (int t=1; t<NUM_THREADS; ++t) pthread_create(&threads[t], &attr, inc_count, (void *)t); /* Wait for all threads to complete */...
2017 Nov 17
0
[nbdkit PATCH 4/4] sockets: Fix lifetime of thread_data
...;thread_data->addr, &thread_data->addrlen); + if (thread_data->sock == -1) { if (errno == EINTR || errno == EAGAIN) goto again; perror ("accept"); + free (thread_data); return; } @@ -291,16 +299,17 @@ accept_connection (int listen_sock) */ pthread_attr_init (&attrs); pthread_attr_setdetachstate (&attrs, PTHREAD_CREATE_DETACHED); - err = pthread_create (&thread, &attrs, start_thread, &thread_data); + err = pthread_create (&thread, &attrs, start_thread, thread_data); pthread_attr_destroy (&attrs); if (err != 0)...
2009 Mar 08
3
Thread creation in Wine
...0; j< CNT; j++) for(unsigned int k=0; k < CNT; k++) for(unsigned int i=0; i<CNT; i++) mysum += i; std::cout << "mysum: " << mysum << std::endl; return 0; } int main(int argc, char *argv[]) { pthread_t pthread_id, pthread_id2; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setscope(&attr, PTHREAD_SCOPE_PROCESS); std::cout << "first thread: " << pthread_create(&pthread_id, &attr, my_th, 0) << std::endl; std::cout << "second thread: " << pthread_create(&pthread_id2, &attr,...
2015 Oct 09
0
Asterisk 11.20.0 Now Available
...by Joshua Colp) * ASTERISK-25265 - [patch]DTLS Failure when calling WebRTC-peer on Firefox 39 - add ECDH support and fallback to prime256v1 (Reported by Stefan Engstr??m) Improvements made in this release: ----------------------------------- * ASTERISK-25310 - [patch]on FreeBSD also pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED (Reported by Guido Falsi) For a full list of changes in this release, please see the ChangeLog: http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-11.20.0 Thank you for your continued support of Asterisk!
2018 Jan 24
0
libasan bug: pthread_create never returns
...cpuset; CPU_ZERO(&cpuset); CPU_SET(1, &cpuset); if (sched_setaffinity(getpid(), sizeof(cpuset), &cpuset) == -1) { perror("sched_setaffinity"); exit(EXIT_FAILURE); } printf("Hey from main\n"); schedule.sched_priority = 20; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setschedpolicy(&attr, SCHED_RR); pthread_attr_setschedparam(&attr, &schedule); pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); pthread_t th; int rc; if ((rc = pthread_create(&th, &attr, dummy_worker, NULL)) != 0) { errno = rc;...
2012 Jun 06
3
[PATCH 0 of 2 V3] xs: fixes to watch thread creation
A pair of patches to the xenstore library that: 1) blocks signal delivery before creating the watch wakeup thread 2) reduces the stack size of the watch wakeup thread.
2017 Feb 06
2
Real time threads don't work in libvirt containers under CentOS 7.3
...ng thread\n"); sleep(1); printf("Thread complete\n"); return 0; } int main(int argc, char *argv[]) { int rc; printf("Starting main\n"); struct sched_param tsparam; pthread_attr_t tattr; memset(&tsparam, 0, sizeof(tsparam)); pthread_attr_init(&tattr); pthread_attr_setinheritsched(&tattr, PTHREAD_EXPLICIT_SCHED); pthread_attr_setschedpolicy(&tattr, SCHED_FIFO); tsparam.sched_priority = sched_get_priority_max(SCHED_FIFO) - 7; pthread_attr_setschedparam(&tattr, &tsparam); if ((rc = pthread_creat...
2009 Mar 18
0
[LLVMdev] Status of LLVM's atomic intrinsics
...EADS]; > 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_count, (void *)1); > for (int t=1; t<NUM_THREADS; ++t) > pthread_create(&threads[t], &attr, inc_count, (void *)t); > > /* Wait...
2015 Oct 09
0
Asterisk 13.6.0 Now Available
...Transferer channel not hung up if no MOH (Reported by Kevin Harwell) Improvements made in this release: ----------------------------------- * ASTERISK-24870 - ARI: Subscriptions to bridges generally not super useful (Reported by Matt Jordan) * ASTERISK-25310 - [patch]on FreeBSD also pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED (Reported by Guido Falsi) For a full list of changes in this release, please see the ChangeLog: http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-13.6.0 Thank you for your continued support of Asterisk!
2017 Nov 17
7
[nbdkit PATCH 0/4] thread-safety issues prior to parallel handling
These patches should be ready to go in now; I will also post my work-in-progress for enabling full parallel handling that depends on these, but with that series, I was still getting crashes or hangs with test-socket-activation (I think I've nailed all the crashes I've seen, but the hang is rather insidious; see my other email
2013 Apr 06
3
btrfs-progs: re-add send-test
...rno; + usage(ret); + } + + r.full_subvol_path = subvol_path; + r.root_path = root_path; + + subvol_fd = open(subvol_path, O_RDONLY|O_NOATIME); + if (subvol_fd < 0) { + ret = errno; + fprintf(stderr, "ERROR: Subvolume open failed. %s\n", + strerror(ret)); + goto out; + } + + ret = pthread_attr_init(&t_attr); + if (ret < 0) { + fprintf(stderr, "ERROR: pthread init failed. %s\n", + strerror(ret)); + goto out; + } + + ret = pipe(pipefd); + if (ret < 0) { + ret = errno; + fprintf(stderr, "ERROR: pipe failed. %s\n", strerror(ret)); + goto out; + } + + ret = pth...
2011 Jul 18
5
[PATCH v3 0/5] btrfs-progs: scrub interface
This is the next patch series for scrub userland tools. Change log v1->v2: - commands now reachable as "btrfs scrub ..." instead of "btrfs filesystem scrub ..." - ability to scrub a single device instead of a whole file system - superfluous command line options removed - resume is now a separate command ("scrub resume") instead of "scrub start -r" -
2017 Jan 23
2
undefined symbols during linking LLDB 4.0 RC1
...se _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc 0000000000000000 DF *UND* 0000000000000082 GLIBC_2.2.5 pthread_mutex_unlock 0000000000000000 DF *UND* 0000000000000044 GLIBC_2.2.5 cfsetospeed 0000000000000000 DF *UND* 000000000000001d GLIBC_2.2.5 pthread_attr_init 0000000000000000 DF *UND* 000000000000011a GLIBC_2.2.5 strerror_r 0000000000000000 DF *UND* 000000000000004b Base del_curterm 0000000000000000 DF *UND* 0000000000000025 Base _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc 0000000000000000 DF...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...tion: %s (%d)"), + long_options[option_index].name, option_index); break; case 'F': diff --git a/p2v/gui.c b/p2v/gui.c index c5fbc99..625c6eb 100644 --- a/p2v/gui.c +++ b/p2v/gui.c @@ -322,10 +322,8 @@ test_connection_clicked (GtkWidget *w, gpointer data) pthread_attr_init (&attr); pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); err = pthread_create (&tid, &attr, test_connection_thread, copy); - if (err != 0) { - fprintf (stderr, "pthread_create: %s\n", strerror (err)); - exit (EXIT_FAILURE); - } + if (err != 0)...
2017 Jan 19
2
undefined symbols during linking LLDB 4.0 RC1
Hello, I update my building scripts to build LLVM 4.0 RC1 (with clang, lldb, libc++, libc++abi, lld) on CentOS 6 and I got a lot of undefined symbols during linking LLDB. I'm using clang-3.9 and this configuration: -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
2016 Jul 13
0
Certified Asterisk 13.8-cert1 Now Available
...by Bryant Zimmerman) * ASTERISK-24718 - [patch]Add inital support of "sanitize" to configure (Reported by Badalian Vyacheslav) * ASTERISK-24870 - ARI: Subscriptions to bridges generally not super useful (Reported by Matt Jordan) * ASTERISK-25310 - [patch]on FreeBSD also pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED (Reported by Guido Falsi) * ASTERISK-25256 - [patch]Post AMI VarSet to empty string events when Asterisk deletes a dialplan variable. (Reported by Richard Mudgett) * ASTERISK-25067 - Sorcery Caching: Implement a new caching module (Repo...
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...+ +#include "interception/interception.h" + +namespace __llvm__safestack { + +// We don't know whether pthread is linked in or not, so we resolve +// all symbols from pthread that we use dynamically +#define __DECLARE_WRAPPER(fn) __typeof__(fn)* __d_ ## fn = NULL; + +__DECLARE_WRAPPER(pthread_attr_init) +__DECLARE_WRAPPER(pthread_attr_destroy) +__DECLARE_WRAPPER(pthread_attr_getstacksize) +__DECLARE_WRAPPER(pthread_attr_getguardsize) +__DECLARE_WRAPPER(pthread_key_create) +__DECLARE_WRAPPER(pthread_setspecific) + +// The unsafe stack pointer is stored in the TCB structure on these platforms +#if...
2010 May 11
1
Samba 3.5.2 compile on AIX
...... no checking for avahi-common/watch.h... no checking avahi-client/client.h usability... no checking avahi-client/client.h presence... no checking for avahi-client/client.h... no checking for avahi_client_new in -lavahi-client... no checking for avahi_strerror in -lavahi-common... no checking for pthread_attr_init in -lpthread... yes checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking for iniparser_load in -liniparser... no checking whether to use included iniparser... yes checking for getmntent... (cached) yes checking for sys/statfs.h... (cached) ye...