pthreads
Making pthread_rwlock_wrlock recursive
I have a problem regarding the behaviour of the pthread function pthread_rwlock_wrlock. The specification linked above states that when one thread has locked the lock for writing and the same thread l[详细]
2023-03-29 02:50 分类:问答How to make pthread_cond_timedwait() robust against system clock manipulations?
Consider the following source code, which is fully POSIX compliant: #include <stdio.h> #include <limits.h>[详细]
2023-03-29 01:18 分类:问答What would be a good tracing library for a C multithreaded program?
I\'m wr开发者_JAVA技巧iting a multithreaded server using Ptrheads and I want to trace the execution of individual threads.[详细]
2023-03-29 01:07 分类:问答C pthread Segmentation fault
so I was trying to make a GPGPU emulator with c & pthreads but ran into a rather strange problem which I have no idea why its occurring. The code is as below:[详细]
2023-03-28 09:16 分类:问答C: How can a threaded program run faster than a non-threaded on the same single core?
I have a server and a client program. The server program runs all the time waiting for requests from clients. For the server to respond to each client it takes 5 seconds using the sleep() function.[详细]
2023-03-28 06:06 分类:问答How to get the linux thread id from RWThreadId?
In the RW documentation it advises to use rwThreadHash to get the threadId for debugging but that still doesn\'t match the actual linux th开发者_如何转开发read id on a thread. Any idea how to get it ([详细]
2023-03-28 00:26 分类:问答Using more than one mutex with a conditional variable
Is there a mechanism to have a conditional variable use multiple mutexes? I am in Linux and pthreads in C++.[详细]
2023-03-27 15:04 分类:问答pthread threadpool scenario
I want to achieve following kind of scenario using pthreads: There are two kinds of threads in a thread pool. First kind executes (say) fun1 second executes fun2. The main thread starts these two thre[详细]
2023-03-27 10:12 分类:问答C: How do you declare a recursive mutex with POSIX threads?
I am a bit confused 开发者_高级运维on how to declare a recursive mutex using pthread. What I try to do is have only one thread at a time be able to run a piece of code(including functions) but after s[详细]
2023-03-27 09:24 分类:问答c, pthread_create gives segmentation fault ?
I\'m keep getting a segmentation fault from where I create thread and declare some variables in the struct...[详细]
2023-03-27 03:59 分类:问答
加载中,请稍侯......