[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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/