Changeset View
Changeset View
Standalone View
Standalone View
tools/regression/pthread/unwind/sem_wait_cancel.cpp
/* $FreeBSD$ */ | /* $FreeBSD$ */ | ||||
/* Test stack unwinding for libc's sem */ | /* Test stack unwinding for libc's sem */ | ||||
#include <pthread.h> | #include <pthread.h> | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <semaphore.h> | #include <semaphore.h> | ||||
#include <unistd.h> | #include <unistd.h> | ||||
#include "Test.cpp" | #include "Test.cpp" | ||||
sem_t sem; | static sem_t sem; | ||||
void * | static void * | ||||
thr(void *arg) | thr(void *arg __unused) | ||||
{ | { | ||||
Test t; | Test t; | ||||
sem_wait(&sem); | sem_wait(&sem); | ||||
printf("Bug, thread shouldn't be here.\n"); | printf("Bug, thread shouldn't be here.\n"); | ||||
return (0); | return (0); | ||||
} | } | ||||
Show All 13 Lines |