search for: pthread_attr_destroy

Displaying 18 results from an estimated 18 matches for "pthread_attr_destroy".

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.
2011 Dec 13
1
Thread-safety issues with vbox driver ?
...loc(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) { pthread_join(threads[i], NULL); } virConnectClose(conn); pthread_exit(NULL); } /************************************************/ Here is the output of the program with 2 defined domains: > libvir: VBOX error : operation f...
2009 Mar 18
3
[LLVMdev] Status of LLVM's atomic intrinsics
...; ++t) pthread_create(&threads[t], &attr, inc_count, (void *)t); /* Wait for all threads to complete */ for (i=0; i<NUM_THREADS; i++) { pthread_join(threads[i], NULL); } printf ("Main(): Waited on %d threads. Done.\n", NUM_THREADS); /* Clean up and exit */ pthread_attr_destroy(&attr); pthread_mutex_destroy(&count_mutex); pthread_cond_destroy(&count_threshold_cv); pthread_exit(NULL); } -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e
2017 Nov 17
0
[nbdkit PATCH 4/4] sockets: Fix lifetime of thread_data
...ction (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) { fprintf (stderr, "%s: pthread_create: %s\n", program_name, strerror (err)); - close (thread_data.sock); + close (thread_data->sock); + free (thread_data); return; } /* If the thread starts successfully, then it is responsible f...
2009 Mar 08
3
Thread creation in Wine
...ope(&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, my_th, 0) << std::endl; pthread_attr_destroy(&attr); pthread_join(pthread_id, 0); pthread_join(pthread_id2, 0); } Compile with g++ -o test -pthread test.cpp. Cheers,
2018 Jan 24
0
libasan bug: pthread_create never returns
...m(&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; perror("pthread_create"); exit(EXIT_FAILURE); } pthread_join(th, NULL); pthread_attr_destroy(&attr); return 0; }
2009 Mar 18
0
[LLVMdev] Status of LLVM's atomic intrinsics
...mp;attr, inc_count, (void *)t); > > /* Wait for all threads to complete */ > for (i=0; i<NUM_THREADS; i++) { > pthread_join(threads[i], NULL); > } > printf ("Main(): Waited on %d threads. Done.\n", NUM_THREADS); > > /* Clean up and exit */ > pthread_attr_destroy(&attr); > pthread_mutex_destroy(&count_mutex); > pthread_cond_destroy(&count_threshold_cv); > pthread_exit(NULL); > > } >
2019 Nov 02
2
[PATCH nbdkit] server: Use GCC hints to move debug and error handling code out of hot paths.
...ata) { + if (unlikely (!thread_data)) { perror ("malloc"); return; } @@ -409,7 +409,7 @@ accept_connection (int listen_sock) pthread_attr_setdetachstate (&attrs, PTHREAD_CREATE_DETACHED); err = pthread_create (&thread, &attrs, start_thread, thread_data); pthread_attr_destroy (&attrs); - if (err != 0) { + if (unlikely (err != 0)) { fprintf (stderr, "%s: pthread_create: %s\n", program_name, strerror (err)); close (thread_data->sock); free (thread_data); -- 2.23.0
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
...+ fprintf(stderr, "ERROR: pthread_join failed: %s\n", + strerror(ret)); + goto out; + } + if (t_err) { + ret = (long int)t_err; + fprintf(stderr, "ERROR: failed to process send stream, ret=%ld " + "(%s)\n", (long int)t_err, strerror(ret)); + goto out; + } + + pthread_attr_destroy(&t_attr); +out: + return ret; +} -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2017 Jan 23
2
undefined symbols during linking LLDB 4.0 RC1
...C_2.2.5 lseek64 0000000000000000 DF *UND* 000000000000047d GLIBC_2.2.5 grantpt 0000000000000000 DF *UND* 0000000000000036 GLIBC_2.2.5 pthread_key_delete 0000000000000000 DF *UND* 0000000000000069 GLIBC_2.2.5 __cxa_atexit 0000000000000000 DF *UND* 0000000000000014 GLIBC_2.2.5 pthread_attr_destroy 0000000000000000 DF *UND* 000000000000002f Base vwprintw 0000000000000000 DF *UND* 000000000000007e GLIBC_2.2.5 asin 0000000000000000 DF *UND* 000000000000009f GLIBC_2.10 accept4 0000000000000000 DF *UND* 000000000000001f Base _ZTv0_n24_NSt3__114basic_iostream...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...D_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) + error (EXIT_FAILURE, err, "pthread_create"); pthread_attr_destroy (&attr); } @@ -1557,10 +1555,8 @@ start_conversion_clicked (GtkWidget *w, gpointer data) pthread_attr_init (&attr); pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); err = pthread_create (&tid, &attr, start_conversion_thread, copy); - 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++
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...ption.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 defined(__i386__) +# define MOVPTR "...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be
2020 Aug 18
15
[PATCH nbdkit 0/9] Port to Windows.
Also available here: https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw This is the port to Windows using native Windows APIs (not MSYS or Cygwin). This patch series is at the point where it basically now works. I can run the server with the memory plugin, and access it remotely using guestfish, creating filesystems and so on without any apparent problems. Nevertheless there are many
2020 Aug 20
15
[PATCH nbdkit 0/13] Port to Windows without using a separate library.
Also available here: https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw-nolib After a lot of work I have made the port to Windows work without using a separate library. Instead, on Windows only, we build an "import library" (library of stubs) which resolves references to nbdkit_* functions in the main program and fixes up the plugin, basically the first technique outlined in
2019 Sep 10
3
[PATCH 0/2] Remove virt-p2v from libguestfs
Now that virt-p2v has its own repository [1] and releases [2], it is time to remove it from libguestfs. [1] https://github.com/libguestfs/virt-p2v [2] http://download.libguestfs.org/virt-p2v/ Pino Toscano (2): Remove virt-p2v Remove remaining virt-p2v bits .gitignore | 4 - Makefile.am | 7 +- bash/Makefile.am