Browse Source

#define _MAX_PAGE_SHIFT in MD _types.h as the maximum pagesize an arch

needs (looking at you sgi, but others required this before).  This is for
the circumstances we need pagesize known at compile time, not getpagesize()
runtime. Use it for malloc storage sizes, for shm, and to set pthread stack
default sizes.  The stack sizes were a mess, and pushing them towards
page-aligned is healthy move (which will also be needed by the coming
stack register checker)
ok guenther kettenis, discussion with stefan
OPENBSD_6_3
deraadt 6 years ago
parent
commit
04e34b8297
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/include/pthread.h

+ 2
- 2
src/include/pthread.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: pthread.h,v 1.3 2017/11/04 22:53:57 jca Exp $ */
/* $OpenBSD: pthread.h,v 1.4 2018/03/05 01:15:26 deraadt Exp $ */
/*
* Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu
@ -51,7 +51,7 @@
*/
#define PTHREAD_DESTRUCTOR_ITERATIONS 4
#define PTHREAD_KEYS_MAX 256
#define PTHREAD_STACK_MIN 2048
#define PTHREAD_STACK_MIN (1U << _MAX_PAGE_SHIFT)
#define PTHREAD_THREADS_MAX ULONG_MAX
/*


Loading…
Cancel
Save