Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Showing results 1 to 7 of 7
Search took 0.00 seconds.
Search: Posts Made By: mynickmynick
Forum: C May 14th, 2008, 8:19 AM
Replies: 3
Views: 325
Posted By mynickmynick
Where can i get source code of NPTL pthreads for linux 2.6.23 or around?

Where can i get source code of NPTL pthreads for linux 2.6.23 or around?
Forum: C May 8th, 2008, 8:59 AM
Replies: 3
Views: 436
Posted By mynickmynick
Re: pthread_cond_wait if cancelled leaves mutex locked deadlocking other threads?!

So may be to prevent this the correct usage is


pthread_mutex_lock(mutex);
pthread_cleanup_push(pthread_mutex_unlock,mutex);
while (...) pthread_cond_wait(cond,mutex);
......
...
Forum: C May 8th, 2008, 8:03 AM
Replies: 3
Views: 436
Posted By mynickmynick
pthread_cond_wait if cancelled leaves mutex locked deadlocking other threads?!

From the following source code

int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
{
volatile pthread_descr self = thread_self();

__pthread_lock(&cond->__c_lock,...
Forum: C May 7th, 2008, 12:27 PM
Replies: 0
Views: 317
Posted By mynickmynick
nice for pthreads? (linux)

With Linux kernel 2.6
nice() called inside a pthread
affects only the calling thread
or all threads of the process??
(I guess in POSIX it affects the process, but Linux is not fully POSIX compliant...
Forum: C May 7th, 2008, 9:39 AM
Replies: 0
Views: 291
Posted By mynickmynick
sem_wait()/post() Vs. pthread_cond_wait()/broadcast()

What are advantages/disadvantages of using

sem_wait() and sem_post() instead of
pthread_cond_wait() and pthread_cond_broadcast()

for sincronizing pthreads?

I guess but please correct...
Forum: C May 5th, 2008, 9:13 AM
Replies: 1
Views: 209
Posted By mynickmynick
pthread safe library functions?

In linux using pthreads
When I call a whatever usual function like for instance:

thread 1
a=div(b,c).rem //a = div remainder of b div c

thread 2
x=div(y,z).rem

so I call the same function on...
Forum: C May 5th, 2008, 8:29 AM
Replies: 1
Views: 196
Posted By mynickmynick
Question sig_atomic_t to avoid mutex/critical sections

On linux using pthreads, if I have a 2-bytes variable x shared by pthreads used only in the following ways:
(1)
x=value;
(2) or (separately)
if (x==value) {do something (not with x)}
(3) or...
Showing results 1 to 7 of 7

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:55 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC