OpenBSD CVS

CVS log for src/lib/librthread/rthread_stack.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.20 / (download) - annotate - [select for diffs], Fri Sep 17 15:20:21 2021 UTC (2 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, HEAD
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

these files do not need sys/param.h

Revision 1.19 / (download) - annotate - [select for diffs], Sun Feb 11 04:12:22 2018 UTC (6 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

Start mapping thread stacks with MAP_STACK.  mmap() currently ignores
the flag, but some problem identification can begin.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Feb 10 22:59:02 2018 UTC (6 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

Shift top-of-stack down so that the random==0 case doesn't leave stack
pointer beyond the space.
ok stefan, tedu

Revision 1.17 / (download) - annotate - [select for diffs], Tue Sep 5 02:40:54 2017 UTC (6 years, 9 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

Move mutex, condvar, and thread-specific data routes, pthread_once, and
pthread_exit from libpthread to libc, along with low-level bits to
support them.  Major bump to both libc and libpthread.

Requested by libressl team.  Ports testing by naddy@
ok kettenis@

Revision 1.16 / (download) - annotate - [select for diffs], Sun Sep 4 10:13:35 2016 UTC (7 years, 9 months ago) by akfaew
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.15: +2 -3 lines
Diff to previous 1.15 (colored)

Get rid of ticket support, replace "struct _spinlock" with "_atomic_lock_t".

ok tedu@

Revision 1.15 / (download) - annotate - [select for diffs], Thu Sep 1 10:56:46 2016 UTC (7 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.14: +1 -2 lines
Diff to previous 1.14 (colored)

delete wrong cvs $ tags

Revision 1.14 / (download) - annotate - [select for diffs], Sat Jan 24 10:35:33 2015 UTC (9 years, 4 months ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (colored)

Add back <sys/param.h>; it's needed for MACHINE_STACK_GROWS_UP.

ok millert@, tobiasu@

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jan 16 16:48:52 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +1 -2 lines
Diff to previous 1.12 (colored)

Move to the <limits.h> universe.
review by millert, binary checking process with doug, concept with guenther

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jun 27 23:21:47 2014 UTC (9 years, 11 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.11: +3 -2 lines
Diff to previous 1.11 (colored)

Fix mmap() flag usage: explicitly specify MAP_PRIVATE and drop useless
MAP_FILE and MAP_HASSEMAPHORE flags.

Discussed with deraadt, tedu, and kettenis

Revision 1.11 / (download) - annotate - [select for diffs], Wed Dec 18 16:42:08 2013 UTC (10 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.10: +15 -5 lines
Diff to previous 1.10 (colored)

Provide a random stackgrap on pthread frames.  Use _STACKALIGNBYTES to
ensure the frames are aligned correctly. Discussed at length with guenther
and kettenis
ok kettenis, this is the right first step

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jun 1 20:47:40 2013 UTC (11 years ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

cleanup and consolidate the spinlock_lock (what a name!) code.
it's now atomic_lock to better reflect its usage, and librthread now
features a new spinlock that's really a ticket lock.
thrlseep can handle both types of lock via a flag in the clock arg.
(temp back compat hack)
remove some old stuff that's accumulated along the way and no longer used.
some feedback from dlg, who is concerned with all things ticket lock.
(you need to boot a new kernel before installing librthread)

Revision 1.9 / (download) - annotate - [select for diffs], Thu Mar 21 21:59:31 2013 UTC (11 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +2 -4 lines
Diff to previous 1.8 (colored)

Do not need machine/param.h

Revision 1.8 / (download) - annotate - [select for diffs], Sat Aug 4 21:56:51 2012 UTC (11 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.7: +8 -6 lines
Diff to previous 1.7 (colored)

Fix caching of stacks allocated with the default attributes.

based on a diff from Christian Schulte (cs at schulte.it)

Revision 1.7 / (download) - annotate - [select for diffs], Sun Feb 19 04:54:40 2012 UTC (12 years, 3 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

Use 'base' as an intermediate char* variable to avoid void* arithmetic

Revision 1.6 / (download) - annotate - [select for diffs], Sat Feb 18 21:12:09 2012 UTC (12 years, 3 months ago) by guenther
Branch: MAIN
Changes since 1.5: +90 -52 lines
Diff to previous 1.5 (colored)

Fix the handling of the stackaddr, stacksize, and guardsize attributes:
don't try to merge values, round the sizes separately, and don't try to
unmap application-supplied stacks.
Copy from uthread the caching of default-sized stacks.
Have pthread_attr_init() and pthread_create() get the default attributes
from staticly allocated pthread_attr_t.
Cache the pagesize in _rthread_init() and provide a macro for rounding to it

based on suggestions from kettenis@ and tedu@, ok kettenis@

Revision 1.5 / (download) - annotate - [select for diffs], Sun Nov 6 11:48:59 2011 UTC (12 years, 7 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.4: +1 -2 lines
Diff to previous 1.4 (colored)

Move <machine/spinlock.h> into rthread.h; strip out unnecessary #includes

Revision 1.4 / (download) - annotate - [select for diffs], Wed May 26 21:40:05 2010 UTC (14 years ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored)

If the stack size attribute isn't larger than the guard-page size
attribute then make pthread_create() return EINVAL instead of whatever
was in errno on entry (possibly making it appear it succeeded when it
really failed).  Encountered by Jung (moorang at gmail.com).

Revision 1.3 / (download) - annotate - [select for diffs], Fri Oct 27 02:41:24 2006 UTC (17 years, 7 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

two comment typos from tbert

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jan 5 08:15:16 2006 UTC (18 years, 5 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.1: +1 -5 lines
Diff to previous 1.1 (colored)

Remove redundant mprotect() calls (we're unmapping the region anyway)
and check user stack for proper alignment.  ok tedu@ marc@

Revision 1.1 / (download) - annotate - [select for diffs], Sun Jan 1 19:32:30 2006 UTC (18 years, 5 months ago) by marc
Branch: MAIN


thread stack handling changes.  Add guard zones and allow stack
size (and guard zone size) to be set using pthread_attr.   Guard
zones are specified in bytes, but implemented in terms of a
page size.

OK Otto@

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.