1994-05-30 19:09:18 +00:00
|
|
|
# @(#)Makefile 8.2 (Berkeley) 12/13/93
|
1999-08-28 00:22:10 +00:00
|
|
|
# $FreeBSD$
|
1994-05-30 19:09:18 +00:00
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2006-03-17 18:54:44 +00:00
|
|
|
|
2016-01-21 16:36:33 +00:00
|
|
|
PACKAGE=runtime-manuals
|
|
|
|
|
2004-01-20 10:27:23 +00:00
|
|
|
MAN= assert.3 \
|
2011-12-27 12:58:54 +00:00
|
|
|
ATOMIC_VAR_INIT.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
bitstring.3 \
|
|
|
|
end.3 \
|
|
|
|
fpgetround.3 \
|
|
|
|
intro.3 \
|
2008-09-28 20:15:45 +00:00
|
|
|
makedev.3 \
|
2012-02-08 08:42:17 +00:00
|
|
|
offsetof.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
${PTHREAD_MAN} \
|
|
|
|
queue.3 \
|
2016-07-15 15:12:56 +00:00
|
|
|
sigevent.3 \
|
2005-12-13 00:28:09 +00:00
|
|
|
siginfo.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
stdarg.3 \
|
|
|
|
sysexits.3 \
|
2004-08-13 22:43:12 +00:00
|
|
|
tgmath.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
timeradd.3 \
|
|
|
|
tree.3
|
2003-12-30 08:44:55 +00:00
|
|
|
|
2011-12-27 12:58:54 +00:00
|
|
|
MLINKS= ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong_explicit.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_compare_exchange_weak.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_compare_exchange_weak_explicit.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_exchange.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_exchange_explicit.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_fetch_add.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_fetch_add_explicit.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_fetch_and.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_fetch_and_explicit.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_fetch_or.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_fetch_or_explicit.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_fetch_sub.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_fetch_sub_explicit.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_fetch_xor.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_fetch_xor_explicit.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_init.3 \
|
2011-12-27 13:01:10 +00:00
|
|
|
ATOMIC_VAR_INIT.3 atomic_is_lock_free.3 \
|
2011-12-27 12:58:54 +00:00
|
|
|
ATOMIC_VAR_INIT.3 atomic_load.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_load_explicit.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_store.3 \
|
|
|
|
ATOMIC_VAR_INIT.3 atomic_store_explicit.3
|
|
|
|
MLINKS+= bitstring.3 bit_alloc.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
bitstring.3 bit_clear.3 \
|
|
|
|
bitstring.3 bit_decl.3 \
|
|
|
|
bitstring.3 bit_ffc.3 \
|
2016-07-26 03:47:16 +00:00
|
|
|
bitstring.3 bit_ffc_at.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
bitstring.3 bit_ffs.3 \
|
2016-07-26 03:47:16 +00:00
|
|
|
bitstring.3 bit_ffs_at.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
bitstring.3 bit_nclear.3 \
|
|
|
|
bitstring.3 bit_nset.3 \
|
|
|
|
bitstring.3 bit_set.3 \
|
|
|
|
bitstring.3 bitstr_size.3 \
|
|
|
|
bitstring.3 bit_test.3
|
|
|
|
MLINKS+= end.3 edata.3 \
|
|
|
|
end.3 etext.3
|
|
|
|
MLINKS+= fpgetround.3 fpgetmask.3 \
|
|
|
|
fpgetround.3 fpgetprec.3 \
|
|
|
|
fpgetround.3 fpgetsticky.3 \
|
|
|
|
fpgetround.3 fpresetsticky.3 \
|
|
|
|
fpgetround.3 fpsetmask.3 \
|
|
|
|
fpgetround.3 fpsetprec.3 \
|
Remove fpsetsticky(). This was added for SysV compatibility, but due
to mistakes from day 1, it has always had semantics inconsistent with
SVR4 and its successors. In particular, given argument M:
- On Solaris and FreeBSD/{alpha,sparc64}, it clobbers the old flags
and *sets* the new flag word to M. (NetBSD, too?)
- On FreeBSD/{amd64,i386}, it *clears* the flags that are specified in M
and leaves the remaining flags unchanged (modulo a small bug on amd64.)
- On FreeBSD/ia64, it is not implemented.
There is no way to fix fpsetsticky() to DTRT for both old FreeBSD apps
and apps ported from other operating systems, so the best approach
seems to be to kill the function and fix any apps that break. I
couldn't find any ports that use it, and any such ports would already
be broken on FreeBSD/ia64 and Linux anyway.
By the way, the routine has always been undocumented in FreeBSD,
except for an MLINK to a manpage that doesn't describe it. This
manpage has stated since 5.3-RELEASE that the functions it describes
are deprecated, so that must mean that functions that it is *supposed*
to describe but doesn't are even *more* deprecated. ;-)
Note that fpresetsticky() has been retained on FreeBSD/i386. As far
as I can tell, no other operating systems or ports of FreeBSD
implement it, so there's nothing for it to be inconsistent with.
PR: 75862
Suggested by: bde
2005-03-15 15:53:39 +00:00
|
|
|
fpgetround.3 fpsetround.3
|
2008-09-28 20:15:45 +00:00
|
|
|
MLINKS+= makedev.3 major.3 \
|
|
|
|
makedev.3 minor.3
|
2004-01-20 10:27:23 +00:00
|
|
|
MLINKS+= ${PTHREAD_MLINKS}
|
2015-06-28 21:06:45 +00:00
|
|
|
MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \
|
|
|
|
queue.3 LIST_CLASS_HEAD.3 \
|
|
|
|
queue.3 LIST_EMPTY.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
queue.3 LIST_ENTRY.3 \
|
|
|
|
queue.3 LIST_FIRST.3 \
|
|
|
|
queue.3 LIST_FOREACH.3 \
|
2014-06-17 02:10:40 +00:00
|
|
|
queue.3 LIST_FOREACH_FROM.3 \
|
|
|
|
queue.3 LIST_FOREACH_FROM_SAFE.3 \
|
2015-06-28 21:06:45 +00:00
|
|
|
queue.3 LIST_FOREACH_SAFE.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
queue.3 LIST_HEAD.3 \
|
|
|
|
queue.3 LIST_HEAD_INITIALIZER.3 \
|
|
|
|
queue.3 LIST_INIT.3 \
|
|
|
|
queue.3 LIST_INSERT_AFTER.3 \
|
|
|
|
queue.3 LIST_INSERT_BEFORE.3 \
|
|
|
|
queue.3 LIST_INSERT_HEAD.3 \
|
|
|
|
queue.3 LIST_NEXT.3 \
|
2012-09-12 21:03:48 +00:00
|
|
|
queue.3 LIST_PREV.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
queue.3 LIST_REMOVE.3 \
|
2011-05-13 15:49:23 +00:00
|
|
|
queue.3 LIST_SWAP.3 \
|
2015-06-28 21:06:45 +00:00
|
|
|
queue.3 SLIST_CLASS_ENTRY.3 \
|
|
|
|
queue.3 SLIST_CLASS_HEAD.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
queue.3 SLIST_EMPTY.3 \
|
|
|
|
queue.3 SLIST_ENTRY.3 \
|
|
|
|
queue.3 SLIST_FIRST.3 \
|
|
|
|
queue.3 SLIST_FOREACH.3 \
|
2014-06-17 02:10:40 +00:00
|
|
|
queue.3 SLIST_FOREACH_FROM.3 \
|
|
|
|
queue.3 SLIST_FOREACH_FROM_SAFE.3 \
|
2015-06-28 21:06:45 +00:00
|
|
|
queue.3 SLIST_FOREACH_SAFE.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
queue.3 SLIST_HEAD.3 \
|
|
|
|
queue.3 SLIST_HEAD_INITIALIZER.3 \
|
|
|
|
queue.3 SLIST_INIT.3 \
|
|
|
|
queue.3 SLIST_INSERT_AFTER.3 \
|
|
|
|
queue.3 SLIST_INSERT_HEAD.3 \
|
|
|
|
queue.3 SLIST_NEXT.3 \
|
|
|
|
queue.3 SLIST_REMOVE.3 \
|
2009-05-27 19:28:04 +00:00
|
|
|
queue.3 SLIST_REMOVE_AFTER.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
queue.3 SLIST_REMOVE_HEAD.3 \
|
2016-09-08 21:20:01 +00:00
|
|
|
queue.3 SLIST_REMOVE_PREVPTR.3 \
|
2011-05-13 15:49:23 +00:00
|
|
|
queue.3 SLIST_SWAP.3 \
|
2015-06-28 21:06:45 +00:00
|
|
|
queue.3 STAILQ_CLASS_ENTRY.3 \
|
|
|
|
queue.3 STAILQ_CLASS_HEAD.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
queue.3 STAILQ_CONCAT.3 \
|
|
|
|
queue.3 STAILQ_EMPTY.3 \
|
|
|
|
queue.3 STAILQ_ENTRY.3 \
|
|
|
|
queue.3 STAILQ_FIRST.3 \
|
|
|
|
queue.3 STAILQ_FOREACH.3 \
|
2014-06-17 02:10:40 +00:00
|
|
|
queue.3 STAILQ_FOREACH_FROM.3 \
|
|
|
|
queue.3 STAILQ_FOREACH_FROM_SAFE.3 \
|
2015-06-28 21:06:45 +00:00
|
|
|
queue.3 STAILQ_FOREACH_SAFE.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
queue.3 STAILQ_HEAD.3 \
|
|
|
|
queue.3 STAILQ_HEAD_INITIALIZER.3 \
|
|
|
|
queue.3 STAILQ_INIT.3 \
|
|
|
|
queue.3 STAILQ_INSERT_AFTER.3 \
|
|
|
|
queue.3 STAILQ_INSERT_HEAD.3 \
|
|
|
|
queue.3 STAILQ_INSERT_TAIL.3 \
|
|
|
|
queue.3 STAILQ_LAST.3 \
|
|
|
|
queue.3 STAILQ_NEXT.3 \
|
|
|
|
queue.3 STAILQ_REMOVE.3 \
|
2009-05-27 19:28:04 +00:00
|
|
|
queue.3 STAILQ_REMOVE_AFTER.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
queue.3 STAILQ_REMOVE_HEAD.3 \
|
2011-05-13 15:49:23 +00:00
|
|
|
queue.3 STAILQ_SWAP.3 \
|
2015-06-28 21:06:45 +00:00
|
|
|
queue.3 TAILQ_CLASS_ENTRY.3 \
|
|
|
|
queue.3 TAILQ_CLASS_HEAD.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
queue.3 TAILQ_CONCAT.3 \
|
|
|
|
queue.3 TAILQ_EMPTY.3 \
|
|
|
|
queue.3 TAILQ_ENTRY.3 \
|
|
|
|
queue.3 TAILQ_FIRST.3 \
|
|
|
|
queue.3 TAILQ_FOREACH.3 \
|
2014-06-17 02:10:40 +00:00
|
|
|
queue.3 TAILQ_FOREACH_FROM.3 \
|
2015-06-28 21:06:45 +00:00
|
|
|
queue.3 TAILQ_FOREACH_FROM_SAFE.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
queue.3 TAILQ_FOREACH_REVERSE.3 \
|
2014-06-17 02:10:40 +00:00
|
|
|
queue.3 TAILQ_FOREACH_REVERSE_FROM.3 \
|
|
|
|
queue.3 TAILQ_FOREACH_REVERSE_FROM_SAFE.3 \
|
2015-06-28 21:06:45 +00:00
|
|
|
queue.3 TAILQ_FOREACH_REVERSE_SAFE.3 \
|
2004-06-04 10:14:55 +00:00
|
|
|
queue.3 TAILQ_FOREACH_SAFE.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
queue.3 TAILQ_HEAD.3 \
|
|
|
|
queue.3 TAILQ_HEAD_INITIALIZER.3 \
|
|
|
|
queue.3 TAILQ_INIT.3 \
|
|
|
|
queue.3 TAILQ_INSERT_AFTER.3 \
|
|
|
|
queue.3 TAILQ_INSERT_BEFORE.3 \
|
|
|
|
queue.3 TAILQ_INSERT_HEAD.3 \
|
|
|
|
queue.3 TAILQ_INSERT_TAIL.3 \
|
|
|
|
queue.3 TAILQ_LAST.3 \
|
|
|
|
queue.3 TAILQ_NEXT.3 \
|
|
|
|
queue.3 TAILQ_PREV.3 \
|
2011-05-13 15:49:23 +00:00
|
|
|
queue.3 TAILQ_REMOVE.3 \
|
|
|
|
queue.3 TAILQ_SWAP.3
|
2004-01-20 10:27:23 +00:00
|
|
|
MLINKS+= stdarg.3 va_arg.3 \
|
|
|
|
stdarg.3 va_copy.3 \
|
|
|
|
stdarg.3 va_end.3 \
|
|
|
|
stdarg.3 varargs.3 \
|
|
|
|
stdarg.3 va_start.3
|
|
|
|
MLINKS+= timeradd.3 timerclear.3 \
|
|
|
|
timeradd.3 timercmp.3 \
|
|
|
|
timeradd.3 timerisset.3 \
|
Make timespecadd(3) and friends public
The timespecadd(3) family of macros were imported from NetBSD back in
r35029. However, they were initially guarded by #ifdef _KERNEL. In the
meantime, we have grown at least 28 syscalls that use timespecs in some
way, leading many programs both inside and outside of the base system to
redefine those macros. It's better just to make the definitions public.
Our kernel currently defines two-argument versions of timespecadd and
timespecsub. NetBSD, OpenBSD, and FreeDesktop.org's libbsd, however, define
three-argument versions. Solaris also defines a three-argument version, but
only in its kernel. This revision changes our definition to match the
common three-argument version.
Bump _FreeBSD_version due to the breaking KPI change.
Discussed with: cem, jilles, ian, bde
Differential Revision: https://reviews.freebsd.org/D14725
2018-07-30 15:46:40 +00:00
|
|
|
timeradd.3 timersub.3 \
|
|
|
|
timeradd.3 timespecadd.3 \
|
|
|
|
timeradd.3 timespecsub.3 \
|
|
|
|
timeradd.3 timespecclear.3 \
|
|
|
|
timeradd.3 timespecisset.3 \
|
|
|
|
timeradd.3 timespeccmp.3
|
2004-01-20 10:27:23 +00:00
|
|
|
MLINKS+= tree.3 RB_EMPTY.3 \
|
|
|
|
tree.3 RB_ENTRY.3 \
|
|
|
|
tree.3 RB_FIND.3 \
|
|
|
|
tree.3 RB_FOREACH.3 \
|
2008-03-07 22:29:53 +00:00
|
|
|
tree.3 RB_FOREACH_REVERSE.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
tree.3 RB_GENERATE.3 \
|
2006-01-19 07:20:20 +00:00
|
|
|
tree.3 RB_GENERATE_STATIC.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
tree.3 RB_HEAD.3 \
|
|
|
|
tree.3 RB_INIT.3 \
|
|
|
|
tree.3 RB_INITIALIZER.3 \
|
|
|
|
tree.3 RB_INSERT.3 \
|
|
|
|
tree.3 RB_LEFT.3 \
|
|
|
|
tree.3 RB_MAX.3 \
|
|
|
|
tree.3 RB_MIN.3 \
|
|
|
|
tree.3 RB_NEXT.3 \
|
2006-01-11 21:28:55 +00:00
|
|
|
tree.3 RB_NFIND.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
tree.3 RB_PARENT.3 \
|
2008-03-07 22:29:53 +00:00
|
|
|
tree.3 RB_PREV.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
tree.3 RB_PROTOTYPE.3 \
|
2006-01-19 07:20:20 +00:00
|
|
|
tree.3 RB_PROTOTYPE_STATIC.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
tree.3 RB_REMOVE.3 \
|
|
|
|
tree.3 RB_RIGHT.3 \
|
|
|
|
tree.3 RB_ROOT.3 \
|
|
|
|
tree.3 SPLAY_EMPTY.3 \
|
|
|
|
tree.3 SPLAY_ENTRY.3 \
|
|
|
|
tree.3 SPLAY_FIND.3 \
|
|
|
|
tree.3 SPLAY_FOREACH.3 \
|
|
|
|
tree.3 SPLAY_GENERATE.3 \
|
|
|
|
tree.3 SPLAY_HEAD.3 \
|
|
|
|
tree.3 SPLAY_INIT.3 \
|
|
|
|
tree.3 SPLAY_INITIALIZER.3 \
|
|
|
|
tree.3 SPLAY_INSERT.3 \
|
|
|
|
tree.3 SPLAY_LEFT.3 \
|
|
|
|
tree.3 SPLAY_MAX.3 \
|
|
|
|
tree.3 SPLAY_MIN.3 \
|
|
|
|
tree.3 SPLAY_NEXT.3 \
|
|
|
|
tree.3 SPLAY_PROTOTYPE.3 \
|
|
|
|
tree.3 SPLAY_REMOVE.3 \
|
|
|
|
tree.3 SPLAY_RIGHT.3 \
|
|
|
|
tree.3 SPLAY_ROOT.3
|
2000-05-12 07:58:37 +00:00
|
|
|
|
2008-03-29 17:44:40 +00:00
|
|
|
.if ${MK_LIBTHR} != "no"
|
2004-01-20 10:27:23 +00:00
|
|
|
PTHREAD_MAN= pthread.3 \
|
2010-01-09 12:31:11 +00:00
|
|
|
pthread_affinity_np.3 \
|
2005-05-18 16:23:11 +00:00
|
|
|
pthread_atfork.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
pthread_attr.3 \
|
2010-01-09 12:31:11 +00:00
|
|
|
pthread_attr_affinity_np.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
pthread_attr_get_np.3 \
|
|
|
|
pthread_attr_setcreatesuspend_np.3 \
|
2004-02-19 13:51:52 +00:00
|
|
|
pthread_barrierattr.3 \
|
2004-09-19 06:11:45 +00:00
|
|
|
pthread_barrier_destroy.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
pthread_cancel.3 \
|
|
|
|
pthread_cleanup_pop.3 \
|
|
|
|
pthread_cleanup_push.3 \
|
|
|
|
pthread_condattr.3 \
|
|
|
|
pthread_cond_broadcast.3 \
|
|
|
|
pthread_cond_destroy.3 \
|
|
|
|
pthread_cond_init.3 \
|
|
|
|
pthread_cond_signal.3 \
|
|
|
|
pthread_cond_timedwait.3 \
|
|
|
|
pthread_cond_wait.3 \
|
|
|
|
pthread_create.3 \
|
|
|
|
pthread_detach.3 \
|
|
|
|
pthread_equal.3 \
|
|
|
|
pthread_exit.3 \
|
|
|
|
pthread_getconcurrency.3 \
|
2012-08-21 09:18:28 +00:00
|
|
|
pthread_getcpuclockid.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
pthread_getspecific.3 \
|
2011-02-07 21:26:46 +00:00
|
|
|
pthread_getthreadid_np.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
pthread_join.3 \
|
|
|
|
pthread_key_create.3 \
|
|
|
|
pthread_key_delete.3 \
|
|
|
|
pthread_kill.3 \
|
|
|
|
pthread_main_np.3 \
|
|
|
|
pthread_multi_np.3 \
|
|
|
|
pthread_mutexattr.3 \
|
|
|
|
pthread_mutexattr_getkind_np.3 \
|
Add implementation of robust mutexes, hopefully close enough to the
intention of the POSIX IEEE Std 1003.1TM-2008/Cor 1-2013.
A robust mutex is guaranteed to be cleared by the system upon either
thread or process owner termination while the mutex is held. The next
mutex locker is then notified about inconsistent mutex state and can
execute (or abandon) corrective actions.
The patch mostly consists of small changes here and there, adding
neccessary checks for the inconsistent and abandoned conditions into
existing paths. Additionally, the thread exit handler was extended to
iterate over the userspace-maintained list of owned robust mutexes,
unlocking and marking as terminated each of them.
The list of owned robust mutexes cannot be maintained atomically
synchronous with the mutex lock state (it is possible in kernel, but
is too expensive). Instead, for the duration of lock or unlock
operation, the current mutex is remembered in a special slot that is
also checked by the kernel at thread termination.
Kernel must be aware about the per-thread location of the heads of
robust mutex lists and the current active mutex slot. When a thread
touches a robust mutex for the first time, a new umtx op syscall is
issued which informs about location of lists heads.
The umtx sleep queues for PP and PI mutexes are split between
non-robust and robust.
Somewhat unrelated changes in the patch:
1. Style.
2. The fix for proper tdfind() call use in umtxq_sleep_pi() for shared
pi mutexes.
3. Removal of the userspace struct pthread_mutex m_owner field.
4. The sysctl kern.ipc.umtx_vnode_persistent is added, which controls
the lifetime of the shared mutex associated with a vnode' page.
Reviewed by: jilles (previous version, supposedly the objection was fixed)
Discussed with: brooks, Martin Simmons <martin@lispworks.com> (some aspects)
Tested by: pho
Sponsored by: The FreeBSD Foundation
2016-05-17 09:56:22 +00:00
|
|
|
pthread_mutex_consistent.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
pthread_mutex_destroy.3 \
|
|
|
|
pthread_mutex_init.3 \
|
|
|
|
pthread_mutex_lock.3 \
|
|
|
|
pthread_mutex_timedlock.3 \
|
|
|
|
pthread_mutex_trylock.3 \
|
|
|
|
pthread_mutex_unlock.3 \
|
|
|
|
pthread_once.3 \
|
|
|
|
pthread_resume_all_np.3 \
|
|
|
|
pthread_resume_np.3 \
|
|
|
|
pthread_rwlockattr_destroy.3 \
|
|
|
|
pthread_rwlockattr_getpshared.3 \
|
|
|
|
pthread_rwlockattr_init.3 \
|
|
|
|
pthread_rwlockattr_setpshared.3 \
|
|
|
|
pthread_rwlock_destroy.3 \
|
|
|
|
pthread_rwlock_init.3 \
|
|
|
|
pthread_rwlock_rdlock.3 \
|
|
|
|
pthread_rwlock_timedrdlock.3 \
|
|
|
|
pthread_rwlock_timedwrlock.3 \
|
|
|
|
pthread_rwlock_unlock.3 \
|
|
|
|
pthread_rwlock_wrlock.3 \
|
|
|
|
pthread_schedparam.3 \
|
|
|
|
pthread_self.3 \
|
|
|
|
pthread_set_name_np.3 \
|
|
|
|
pthread_setspecific.3 \
|
|
|
|
pthread_sigmask.3 \
|
2004-01-22 15:31:56 +00:00
|
|
|
pthread_spin_init.3 \
|
|
|
|
pthread_spin_lock.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
pthread_suspend_all_np.3 \
|
|
|
|
pthread_suspend_np.3 \
|
|
|
|
pthread_switch_add_np.3 \
|
2006-09-18 18:07:49 +00:00
|
|
|
pthread_testcancel.3 \
|
|
|
|
pthread_yield.3
|
2004-01-14 21:44:26 +00:00
|
|
|
|
2010-01-09 12:31:11 +00:00
|
|
|
PTHREAD_MLINKS= pthread_affinity_np.3 pthread_getaffinity_np.3 \
|
|
|
|
pthread_affinity_np.3 pthread_setaffinity_np.3
|
|
|
|
PTHREAD_MLINKS+=pthread_attr.3 pthread_attr_destroy.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
pthread_attr.3 pthread_attr_getdetachstate.3 \
|
|
|
|
pthread_attr.3 pthread_attr_getguardsize.3 \
|
|
|
|
pthread_attr.3 pthread_attr_getinheritsched.3 \
|
|
|
|
pthread_attr.3 pthread_attr_getschedparam.3 \
|
|
|
|
pthread_attr.3 pthread_attr_getschedpolicy.3 \
|
|
|
|
pthread_attr.3 pthread_attr_getscope.3 \
|
|
|
|
pthread_attr.3 pthread_attr_getstack.3 \
|
|
|
|
pthread_attr.3 pthread_attr_getstackaddr.3 \
|
|
|
|
pthread_attr.3 pthread_attr_getstacksize.3 \
|
|
|
|
pthread_attr.3 pthread_attr_init.3 \
|
|
|
|
pthread_attr.3 pthread_attr_setdetachstate.3 \
|
|
|
|
pthread_attr.3 pthread_attr_setguardsize.3 \
|
|
|
|
pthread_attr.3 pthread_attr_setinheritsched.3 \
|
|
|
|
pthread_attr.3 pthread_attr_setschedparam.3 \
|
|
|
|
pthread_attr.3 pthread_attr_setschedpolicy.3 \
|
|
|
|
pthread_attr.3 pthread_attr_setscope.3 \
|
|
|
|
pthread_attr.3 pthread_attr_setstack.3 \
|
|
|
|
pthread_attr.3 pthread_attr_setstackaddr.3 \
|
|
|
|
pthread_attr.3 pthread_attr_setstacksize.3
|
2010-01-09 12:31:11 +00:00
|
|
|
PTHREAD_MLINKS+=pthread_attr_affinity_np.3 pthread_attr_getaffinity_np.3 \
|
|
|
|
pthread_attr_affinity_np.3 pthread_attr_setaffinity_np.3
|
2004-02-19 13:51:52 +00:00
|
|
|
PTHREAD_MLINKS+=pthread_barrierattr.3 pthread_barrierattr_destroy.3 \
|
|
|
|
pthread_barrierattr.3 pthread_barrierattr_getpshared.3 \
|
|
|
|
pthread_barrierattr.3 pthread_barrierattr_init.3 \
|
|
|
|
pthread_barrierattr.3 pthread_barrierattr_setpshared.3
|
2004-09-19 06:11:45 +00:00
|
|
|
PTHREAD_MLINKS+=pthread_barrier_destroy.3 pthread_barrier_init.3 \
|
|
|
|
pthread_barrier_destroy.3 pthread_barrier_wait.3
|
2004-01-20 10:27:23 +00:00
|
|
|
PTHREAD_MLINKS+=pthread_condattr.3 pthread_condattr_destroy.3 \
|
2010-05-09 14:21:34 +00:00
|
|
|
pthread_condattr.3 pthread_condattr_init.3 \
|
|
|
|
pthread_condattr.3 pthread_condattr_getclock.3 \
|
|
|
|
pthread_condattr.3 pthread_condattr_setclock.3 \
|
|
|
|
pthread_condattr.3 pthread_condattr_getpshared.3 \
|
|
|
|
pthread_condattr.3 pthread_condattr_setpshared.3
|
2004-01-20 10:27:23 +00:00
|
|
|
PTHREAD_MLINKS+=pthread_getconcurrency.3 pthread_setconcurrency.3
|
|
|
|
PTHREAD_MLINKS+=pthread_multi_np.3 pthread_single_np.3
|
|
|
|
PTHREAD_MLINKS+=pthread_mutexattr.3 pthread_mutexattr_destroy.3 \
|
|
|
|
pthread_mutexattr.3 pthread_mutexattr_getprioceiling.3 \
|
|
|
|
pthread_mutexattr.3 pthread_mutexattr_getprotocol.3 \
|
Add implementation of robust mutexes, hopefully close enough to the
intention of the POSIX IEEE Std 1003.1TM-2008/Cor 1-2013.
A robust mutex is guaranteed to be cleared by the system upon either
thread or process owner termination while the mutex is held. The next
mutex locker is then notified about inconsistent mutex state and can
execute (or abandon) corrective actions.
The patch mostly consists of small changes here and there, adding
neccessary checks for the inconsistent and abandoned conditions into
existing paths. Additionally, the thread exit handler was extended to
iterate over the userspace-maintained list of owned robust mutexes,
unlocking and marking as terminated each of them.
The list of owned robust mutexes cannot be maintained atomically
synchronous with the mutex lock state (it is possible in kernel, but
is too expensive). Instead, for the duration of lock or unlock
operation, the current mutex is remembered in a special slot that is
also checked by the kernel at thread termination.
Kernel must be aware about the per-thread location of the heads of
robust mutex lists and the current active mutex slot. When a thread
touches a robust mutex for the first time, a new umtx op syscall is
issued which informs about location of lists heads.
The umtx sleep queues for PP and PI mutexes are split between
non-robust and robust.
Somewhat unrelated changes in the patch:
1. Style.
2. The fix for proper tdfind() call use in umtxq_sleep_pi() for shared
pi mutexes.
3. Removal of the userspace struct pthread_mutex m_owner field.
4. The sysctl kern.ipc.umtx_vnode_persistent is added, which controls
the lifetime of the shared mutex associated with a vnode' page.
Reviewed by: jilles (previous version, supposedly the objection was fixed)
Discussed with: brooks, Martin Simmons <martin@lispworks.com> (some aspects)
Tested by: pho
Sponsored by: The FreeBSD Foundation
2016-05-17 09:56:22 +00:00
|
|
|
pthread_mutexattr.3 pthread_mutexattr_getrobust.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
pthread_mutexattr.3 pthread_mutexattr_gettype.3 \
|
|
|
|
pthread_mutexattr.3 pthread_mutexattr_init.3 \
|
|
|
|
pthread_mutexattr.3 pthread_mutexattr_setprioceiling.3 \
|
|
|
|
pthread_mutexattr.3 pthread_mutexattr_setprotocol.3 \
|
Add implementation of robust mutexes, hopefully close enough to the
intention of the POSIX IEEE Std 1003.1TM-2008/Cor 1-2013.
A robust mutex is guaranteed to be cleared by the system upon either
thread or process owner termination while the mutex is held. The next
mutex locker is then notified about inconsistent mutex state and can
execute (or abandon) corrective actions.
The patch mostly consists of small changes here and there, adding
neccessary checks for the inconsistent and abandoned conditions into
existing paths. Additionally, the thread exit handler was extended to
iterate over the userspace-maintained list of owned robust mutexes,
unlocking and marking as terminated each of them.
The list of owned robust mutexes cannot be maintained atomically
synchronous with the mutex lock state (it is possible in kernel, but
is too expensive). Instead, for the duration of lock or unlock
operation, the current mutex is remembered in a special slot that is
also checked by the kernel at thread termination.
Kernel must be aware about the per-thread location of the heads of
robust mutex lists and the current active mutex slot. When a thread
touches a robust mutex for the first time, a new umtx op syscall is
issued which informs about location of lists heads.
The umtx sleep queues for PP and PI mutexes are split between
non-robust and robust.
Somewhat unrelated changes in the patch:
1. Style.
2. The fix for proper tdfind() call use in umtxq_sleep_pi() for shared
pi mutexes.
3. Removal of the userspace struct pthread_mutex m_owner field.
4. The sysctl kern.ipc.umtx_vnode_persistent is added, which controls
the lifetime of the shared mutex associated with a vnode' page.
Reviewed by: jilles (previous version, supposedly the objection was fixed)
Discussed with: brooks, Martin Simmons <martin@lispworks.com> (some aspects)
Tested by: pho
Sponsored by: The FreeBSD Foundation
2016-05-17 09:56:22 +00:00
|
|
|
pthread_mutexattr.3 pthread_mutexattr_setrobust.3 \
|
2004-01-20 10:27:23 +00:00
|
|
|
pthread_mutexattr.3 pthread_mutexattr_settype.3
|
|
|
|
PTHREAD_MLINKS+=pthread_mutexattr_getkind_np.3 pthread_mutexattr_setkind_np.3
|
|
|
|
PTHREAD_MLINKS+=pthread_rwlock_rdlock.3 pthread_rwlock_tryrdlock.3
|
|
|
|
PTHREAD_MLINKS+=pthread_rwlock_wrlock.3 pthread_rwlock_trywrlock.3
|
|
|
|
PTHREAD_MLINKS+=pthread_schedparam.3 pthread_getschedparam.3 \
|
|
|
|
pthread_schedparam.3 pthread_setschedparam.3
|
2004-01-22 15:31:56 +00:00
|
|
|
PTHREAD_MLINKS+=pthread_spin_init.3 pthread_spin_destroy.3 \
|
|
|
|
pthread_spin_lock.3 pthread_spin_trylock.3 \
|
|
|
|
pthread_spin_lock.3 pthread_spin_unlock.3
|
2004-01-20 10:27:23 +00:00
|
|
|
PTHREAD_MLINKS+=pthread_switch_add_np.3 pthread_switch_delete_np.3
|
|
|
|
PTHREAD_MLINKS+=pthread_testcancel.3 pthread_setcancelstate.3 \
|
|
|
|
pthread_testcancel.3 pthread_setcanceltype.3
|
2010-09-11 09:26:36 +00:00
|
|
|
PTHREAD_MLINKS+=pthread_join.3 pthread_timedjoin_np.3
|
2004-01-14 21:44:26 +00:00
|
|
|
.endif
|
|
|
|
|
1994-05-30 19:09:18 +00:00
|
|
|
.include <bsd.prog.mk>
|