194 #define uf_thread_error_detection uf_x.x_thread_error_detection
195 #define uf_trs_ted uf_h.h_trs_ted /* both of the above */
196
197 /*
198 * NOTE WELL:
199 * To enable further optimization, the "ul_schedctl_called" member
200 * of the ulwp_t structure (below) serves double-duty:
201 * 1. If NULL, it means that the thread must call __schedctl()
202 * to set up its schedctl mappings before acquiring a mutex.
203 * This is required by the implementation of adaptive mutex locking.
204 * 2. If non-NULL, it points to uberdata.uberflags, so that tests of
205 * uberflags can be made without additional memory references.
206 * This allows the common case of _mutex_lock() and _mutex_unlock() for
207 * USYNC_THREAD mutexes with no error detection and no lock statistics
208 * to be optimized for speed.
209 */
210
211 /* double the default stack size for 64-bit processes */
212 #ifdef _LP64
213 #define MINSTACK (8 * 1024)
214 #define DEFAULTSTACK (2 * 1024 * 1024)
215 #else
216 #define MINSTACK (4 * 1024)
217 #define DEFAULTSTACK (1024 * 1024)
218 #endif
219
220 #define MUTEX_TRY 0
221 #define MUTEX_LOCK 1
222 #define MUTEX_NOCEIL 0x40
223
224 #if defined(__x86)
225
226 typedef struct { /* structure returned by fnstenv */
227 int fctrl; /* control word */
228 int fstat; /* status word (flags, etc) */
229 int ftag; /* tag of which regs busy */
230 int misc[4]; /* other stuff, 28 bytes total */
231 } fpuenv_t;
232
233 #ifdef _SYSCALL32
234 typedef fpuenv_t fpuenv32_t;
235 #endif /* _SYSCALL32 */
236
237 #elif defined(__sparc)
|
194 #define uf_thread_error_detection uf_x.x_thread_error_detection
195 #define uf_trs_ted uf_h.h_trs_ted /* both of the above */
196
197 /*
198 * NOTE WELL:
199 * To enable further optimization, the "ul_schedctl_called" member
200 * of the ulwp_t structure (below) serves double-duty:
201 * 1. If NULL, it means that the thread must call __schedctl()
202 * to set up its schedctl mappings before acquiring a mutex.
203 * This is required by the implementation of adaptive mutex locking.
204 * 2. If non-NULL, it points to uberdata.uberflags, so that tests of
205 * uberflags can be made without additional memory references.
206 * This allows the common case of _mutex_lock() and _mutex_unlock() for
207 * USYNC_THREAD mutexes with no error detection and no lock statistics
208 * to be optimized for speed.
209 */
210
211 /* double the default stack size for 64-bit processes */
212 #ifdef _LP64
213 #define MINSTACK (8 * 1024)
214 #define DEFAULTSTACK (8 * 1024 * 1024)
215 #else
216 #define MINSTACK (4 * 1024)
217 #define DEFAULTSTACK (4 * 1024 * 1024)
218 #endif
219
220 #define MUTEX_TRY 0
221 #define MUTEX_LOCK 1
222 #define MUTEX_NOCEIL 0x40
223
224 #if defined(__x86)
225
226 typedef struct { /* structure returned by fnstenv */
227 int fctrl; /* control word */
228 int fstat; /* status word (flags, etc) */
229 int ftag; /* tag of which regs busy */
230 int misc[4]; /* other stuff, 28 bytes total */
231 } fpuenv_t;
232
233 #ifdef _SYSCALL32
234 typedef fpuenv_t fpuenv32_t;
235 #endif /* _SYSCALL32 */
236
237 #elif defined(__sparc)
|