From 74604ed9c419ab380cacaaeb78e4c26f9f37e0ad Mon Sep 17 00:00:00 2001 From: davidxu Date: Sat, 25 Sep 2010 01:57:47 +0000 Subject: To support stack unwinding for cancellation points, add -fexceptions flag for them, two functions _pthread_cancel_enter and _pthread_cancel_leave are added to let thread enter and leave a cancellation point, it also makes it possible that other functions can be cancellation points in libraries without having to be rewritten in libthr. --- lib/libc/gen/Makefile.inc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/libc/gen/Makefile.inc') diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index dd4bb5a..32888dd 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -25,7 +25,7 @@ SRCS+= __getosreldate.c __xuname.c \ pause.c pmadvise.c popen.c posix_spawn.c \ psignal.c pututxline.c pw_scan.c pwcache.c \ raise.c readdir.c readpassphrase.c rewinddir.c \ - scandir.c seed48.c seekdir.c sem.c sem_new.c semctl.c \ + scandir.c seed48.c seekdir.c semctl.c \ setdomainname.c sethostname.c setjmperr.c setmode.c \ setproctitle.c setprogname.c siginterrupt.c siglist.c signal.c \ sigsetops.c sleep.c srand48.c statvfs.c stringlist.c strtofflags.c \ @@ -35,6 +35,14 @@ SRCS+= __getosreldate.c __xuname.c \ usleep.c utime.c utxdb.c valloc.c vis.c wait.c wait3.c waitpid.c \ wordexp.c +CANCELPOINTS_SRCS=sem.c sem_new.c +.for src in ${CANCELPOINTS_SRCS} +SRCS+=cancelpoints_${src} +CLEANFILES+=cancelpoints_${src} +cancelpoints_${src}: + ln -sf ${.CURDIR}/gen/${src} ${.TARGET} +.endfor + SYM_MAPS+=${.CURDIR}/gen/Symbol.map # machine-dependent gen sources -- cgit v1.1