003 File Manager
Current Path:
/usr/src/tools/regression/pthread/unwind
usr
/
src
/
tools
/
regression
/
pthread
/
unwind
/
📁
..
📄
Makefile
(537 B)
📄
Test.cpp
(578 B)
📄
catch_pthread_exit.cpp
(498 B)
📄
cond_wait_cancel.cpp
(626 B)
📄
cond_wait_cancel2.cpp
(795 B)
📄
main_thread_exit.cpp
(229 B)
📄
sem_wait_cancel.cpp
(470 B)
📄
thread_normal_exit.cpp
(391 B)
Editing: sem_wait_cancel.cpp
/* $FreeBSD$ */ /* Test stack unwinding for libc's sem */ #include <pthread.h> #include <stdio.h> #include <semaphore.h> #include <unistd.h> #include "Test.cpp" sem_t sem; void * thr(void *arg) { Test t; sem_wait(&sem); printf("Bug, thread shouldn't be here.\n"); return (0); } int main() { pthread_t td; sem_init(&sem, 0, 0); pthread_create(&td, NULL, thr, NULL); sleep(1); pthread_cancel(td); pthread_join(td, NULL); check_destruct(); return (0); }
Upload File
Create Folder