Commit Graph

882 Commits

Author SHA1 Message Date
maya
591f556772 Add a todo item for a future major bump (rename many symbols) 2018-09-09 07:24:59 +00:00
kamil
66f17364ec Drop a duplicate instruction line
No functional change intended.
2018-08-19 02:10:42 +00:00
kre
65afe3be98 PR lib/53477 (rudolf at eq.cz) - correct an obvious mistake. 2018-07-28 14:00:19 +00:00
christos
aa66956410 But set NOSANITIZER 2018-06-09 23:45:56 +00:00
christos
64715b9aa8 We can't build those three with MKSANITIZER, they are used too early. 2018-06-09 22:41:55 +00:00
chs
9f52f2295e remove hard-coded -fomit-frame-pointer for pthread stuff,
let these use the same setting as the rest of the tree.
the performance difference is marginal and this allows
dtrace ustack() to work better.
2018-02-25 18:51:18 +00:00
kamil
6dca39b9a1 Remove namespace restriction from pthread_condattr_{g,s}etclock(3)
These functions were marked as _NETBSD_SOURCE when introduced to the
sources. In fact they are regular POSIX threading functions available
since the 2001 standard. There is an older mention about alignment with
"IEEE Std 1003.1j-2000".

This corrects usage of these functions when a source code is compiled
with a POSIX namespace option.
2018-02-20 05:10:51 +00:00
christos
97e40f12ae fix duplicate declaration of pthread_atfork in unistd.h 2018-02-06 20:22:23 +00:00
christos
4491ce1a6d Needs to be protected since it has a timespec argument. Found by lint(1) 2017-12-26 17:00:50 +00:00
kre
93e0a20756 Revert last 2 updates - these are, of course, not needed at all... 2017-12-08 09:59:26 +00:00
kre
4ebaec0fd9 This time do _lwp_park() timeout unconsting correctly not just compilably. 2017-12-08 09:41:16 +00:00
kre
85d957d42b Deal with more lwp_park() timestamp unconsting 2017-12-08 09:24:31 +00:00
christos
01521b4a47 unconst the timestamp 2017-12-08 03:08:19 +00:00
wiz
661e3b5159 Remove superfluous Tn. 2017-10-23 01:03:23 +00:00
abhinav
d06479fa8d All the four functions described in the man page conform to POSIX.1 2017-10-22 18:37:01 +00:00
abhinav
3a2c8ba99e Add missing word in the sentence 2017-10-22 18:26:46 +00:00
abhinav
3e5ec8a33f Add missing function names in the NAME section for rest of the man pages in libpthread 2017-10-22 16:37:24 +00:00
abhinav
3aabdfe0ee Remove description of pthread_barrierattr_getpshared and pthread_barrierattr_setpshared
These functions are described in pthread_barrierattr(3) man page
2017-10-22 16:15:02 +00:00
abhinav
3db8282e27 Add rest of the pthread_barrier functions in the NAME section 2017-10-22 16:09:22 +00:00
abhinav
73a3e7fa13 Add pthread_attr_setdetachstate to NAME section 2017-10-22 15:48:11 +00:00
abhinav
ccdb3ad6e1 Add pthread_getattr_np to the NAME section 2017-10-22 15:44:21 +00:00
kamil
133682b8bb Support <pthread_typs.h> on C89 compilers
Clang 5.0.0(svn) reports warnings on <pthread_types.h> for C99 constructs
when used with strict -std=c89.

Restrict designated initializers usage to C99 or newer code.
C89 and C++ will share the same code without extension of designated
initializers.

PR 52285
2017-09-09 23:21:45 +00:00
martin
7f878ea30c pthread__attr_init_private:
malloc+memset -> calloc. Also initialize all values to the proper
defaults.
This fixes the "rustc panic" discussed on pkgsrc-users.
OK: joerg
2017-08-01 12:31:45 +00:00
skrll
8342d7e564 Typo in comment 2017-07-17 20:24:07 +00:00
joerg
e5678be828 Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This
functions are used for destructors of thread_local objects.

If a pending destructor exists, prevent unloading of shared objects.
Introduce __dl_cxa_refcount interface for this purpose. When the last
reference is gone and the object has been dlclose'd before, the
unloading is finalized.

Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists
on providing __cxa_thread_atexit as direct wrapper without further
patching.
2017-07-11 15:21:31 +00:00
christos
e7a07d38ee PR/52386: Use the number of iterations we document. 2017-07-09 20:21:08 +00:00
wiz
01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
joerg
d3a99cd597 Do not look at environmental variables for suid/guid binaries. 2017-07-02 17:13:07 +00:00
joerg
5f391f4ae2 Export the guard size of the main thread via vm.guard_size. Add a
complementary writable sysctl for the initial guard size of threads
created via pthread_create. Let the existing attribut accessors do the
right thing. Raise the default guard size for threads to 64KB.
2017-07-02 16:41:32 +00:00
maya
38f9590df4 Remove outdated CAVEATS.
Not sure everything is standards compliant, but I've been told non-default
values are supported and pshared exists.
2017-03-28 17:42:52 +00:00
njoly
9be71c742b Fix man page ERRORS section for (clock,pthread}_getcpuclockid to match
reality.
2017-03-05 18:42:51 +00:00
njoly
5e0724b3f9 Fix {clock,pthread}_getcpuclockid to return an error number on
failure, to match OpenGroup specifications.
2017-03-04 11:16:33 +00:00
kamil
0892a29a1a libpthread_dbg(3) deletion from the base distribution
libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

Remaining users of this API can still use this library from
pkgsrc/devel/libpthread_dbg.

Sponsored by <The NetBSD Foundation>
2017-02-08 03:44:40 +00:00
njoly
cada2c18c7 Fix a typo : pthread_mutexaddr_init -> pthread_mutexattr_init. 2017-02-02 10:48:22 +00:00
wiz
fe65e38bd3 Bump date for previous. 2016-11-24 12:19:28 +00:00
kamil
6c74bd40be Add reference in SEE ALSO to pthread_dbg(3)
Sponsored by <The NetBSD Foundation>
2016-11-22 00:32:09 +00:00
christos
6e03f6000c Don't spin if we already own the mutex, otherwise we will get stuck spinning
forever, fixes timemutex{1,2} tests.
2016-10-31 23:53:12 +00:00
kamil
06b9d77598 POSIX harder the pthread_mutex_timedlock(3) prototype
Add missing __restrict keyword to the first pointer parameter.

It was already used for the second argument, should not be a functional
change and generated code should be the same.

This new form is now aligned with POSIX.
2016-10-30 23:26:33 +00:00
christos
285a8995e1 unnamed unions need special treatment since they need braced initializers
for old style initializations.
2016-07-20 21:02:04 +00:00
christos
353946982c cplusplus does not like complex named initializers... 2016-07-20 20:06:04 +00:00
christos
b826eda4de use named initializers 2016-07-20 19:26:52 +00:00
skrll
3b2c691c07 Use anonymous union for ptm_ceiling and old __pthread_spin_t field to
maintain backward compatibility and fix hppa build.  hppa has an non-
integer type __pthread_spin_t
2016-07-17 13:49:43 +00:00
skrll
d946c609af KNF 2016-07-16 12:58:11 +00:00
wiz
b9737c740d Fix some lint.
Too much or too little whitespace;
improve macro usage;
add missing .El;
merge error sections for same error code.
2016-07-05 10:04:17 +00:00
christos
7cf7644fc7 GSoC 2016 Charles Cui: Implement thread priority protection based on work
by Andy Doran. Also document the get/set pshared thread calls as not
implemented, and add a skeleton implementation that is disabled.
XXX: document _sched_protect(2).
2016-07-03 14:24:58 +00:00
wiz
a0a33836af Formatting, typos, whitespace fixes. 2016-04-24 09:01:45 +00:00
christos
3c50b65c77 commit the right file. 2016-04-24 00:05:28 +00:00
christos
ed7dbad892 bump 2016-04-23 23:23:17 +00:00
christos
d394d2a9b5 Add pthread_getcpuclockid(3) 2016-04-23 23:12:19 +00:00
dholland
eb0c9743f2 _SC_PAGESIZE is not the page size; it's a symbolic code for retrieving
the page size.
2016-04-07 06:21:48 +00:00