[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [microblaze-uclinux] pthread_mutex_unlock() on unlocked mutex lock system hard
Hi,
I have been evaluating pthreads for a while, I have found that using sleeps in the thread locks up the target board.
Regards,
-----Original Message-----
From: owner-microblaze-uclinux@itee.uq.edu.au
[mailto:owner-microblaze-uclinux@itee.uq.edu.au]On Behalf Of Yasushi
SHOJI
Sent: Wednesday, August 25, 2004 2:51 AM
To: microblaze-uclinux@itee.uq.edu.au
Subject: [microblaze-uclinux] pthread_mutex_unlock() on unlocked mutex
lock system hard
Hi,
attached code locks system hard. I'm not sure where to look
for. armnommu works just fine with same code, so this problem should
be microblaze specific. (or SUZAKU specific, I don't know)
does anyone see this?
regards,
--
yashi
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
void thread_func(void *Param){
int ret;
printf("process wait\n");
sleep(1);
ret = pthread_mutex_unlock(&mutex);
printf("process run %d\n", ret);
}
int main(void){
pthread_t thread;
pthread_create(&thread, NULL, (void *)thread_func, NULL);
pthread_join(thread, NULL);
return 0;
}
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/