OpenBSD CVS

CVS log for src/lib/librthread/Attic/rthread_cancel.c


[BACK] Up to [local] / src / lib / librthread

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.11, Sat May 7 19:05:22 2016 UTC (8 years, 1 month ago) by guenther
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +1 -1 lines
FILE REMOVED

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a.  This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes.  'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@

Revision 1.10 / (download) - annotate - [select for diffs], Thu Oct 15 16:38:04 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored)

Handle F_ISATTY in the fcntl() stub as well
ok guenther

Revision 1.9 / (download) - annotate - [select for diffs], Sun Aug 31 20:23:10 2014 UTC (9 years, 9 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.8: +19 -1 lines
Diff to previous 1.8 (colored)

accept4() should be a cancellation point.
Update the list in the pthread_testcancel(3) manpage: several were missing.

noted by miod@

Revision 1.8 / (download) - annotate - [select for diffs], Fri Oct 4 03:31:16 2013 UTC (10 years, 8 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.7: +1 -2 lines
Diff to previous 1.7 (colored)

_thread_sys_tcdrain() doesn't exist and isn't used

Revision 1.7 / (download) - annotate - [select for diffs], Mon Apr 29 17:06:20 2013 UTC (11 years, 1 month ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.6: +47 -3 lines
Diff to previous 1.6 (colored)

Extend P_SIGSUSPEND handling in userret() to properly restore the
sigmask even if there are no pending signals under the temporary
sigmask.

Refactor existing select() and poll() system calls to introduce the
pselect() and ppoll() system calls.

Add rthread wrappers for pselect() and ppoll().  While there, update
cancellation point comments to reflect recent fdatasync() addition.

Minor bumps for libc and librthread due to new symbols.

ok guenther, millert, deraadt, jmc

Revision 1.6 / (download) - annotate - [select for diffs], Tue Apr 17 15:10:11 2012 UTC (12 years, 1 month ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.5: +1 -3 lines
Diff to previous 1.5 (colored)

Remove "#define _POSIX_THREADS" line before include <pthread.h>.
The latter contains "#define _POSIX_THREADS 1" which makes gcc 2.95 complain.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Mar 22 01:11:47 2012 UTC (12 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.4: +16 -2 lines
Diff to previous 1.4 (colored)

closefrom() should be a cancellation point

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jan 17 02:34:18 2012 UTC (12 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.3: +28 -4 lines
Diff to previous 1.3 (colored)

Reimplement mutexes, condvars, and rwlocks to eliminate bugs,
particularly the "consume the signal you just sent" hang, and putting
the wait queues in userspace.

Do cancellation handling in pthread_cond_*wait(), pthread_join(),
and sem_wait().

Add __ prefix to thr{sleep,wakeup,exit,sigdivert}() syscalls; add
'abort" argument to thrsleep to close cancellation race; make
thr{sleep,wakeup} return errno values via *retval to avoid touching
userspace errno.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jan 4 05:46:38 2012 UTC (12 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.2: +5 -5 lines
Diff to previous 1.2 (colored)

Delete some parameter names and extra semicolons that slipped through

Revision 1.2 / (download) - annotate - [select for diffs], Tue Dec 27 17:36:59 2011 UTC (12 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.1: +4 -2 lines
Diff to previous 1.1 (colored)

Don't let applications block, wait for, or handle SIGTHR, as the
thread library uses it internally for cancellation.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Dec 5 04:02:03 2011 UTC (12 years, 6 months ago) by guenther
Branch: MAIN

Implement cancelation for the basic syscall cancelation points,
using previously allocated SIGTHR to interrupt in-process syscalls
and fixing the spelling of "cancelled" along the way.
Modeled on FreeBSD's libthr

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.