diff options
author | Roger A. Faulkner <Roger.Faulkner@Sun.COM> | 2009-03-25 17:21:37 -0700 |
---|---|---|
committer | Roger A. Faulkner <Roger.Faulkner@Sun.COM> | 2009-03-25 17:21:37 -0700 |
commit | 09ce0d4acf1a79c720d7e54b60e87cbfa0f1b2d6 (patch) | |
tree | 93c46b6617bd292c19e8b839ab1233af69b7dfc5 /usr/src/lib/libc/inc/thr_uberdata.h | |
parent | 7a088f03b431bdffa96c3b2175964d4d38420caa (diff) | |
download | illumos-gate-09ce0d4acf1a79c720d7e54b60e87cbfa0f1b2d6.tar.gz |
6816409 mutex_lock() for process robust mutex could not return EOWNERDEAD with 137111-01 or later
--HG--
rename : usr/src/lib/libc/common/sys/mmap.s => usr/src/lib/libc/common/sys/__mmap.s
rename : usr/src/lib/libc/common/sys/munmap.s => usr/src/lib/libc/common/sys/__munmap.s
Diffstat (limited to 'usr/src/lib/libc/inc/thr_uberdata.h')
-rw-r--r-- | usr/src/lib/libc/inc/thr_uberdata.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/usr/src/lib/libc/inc/thr_uberdata.h b/usr/src/lib/libc/inc/thr_uberdata.h index 745547208c..442098a2d1 100644 --- a/usr/src/lib/libc/inc/thr_uberdata.h +++ b/usr/src/lib/libc/inc/thr_uberdata.h @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -705,16 +705,23 @@ typedef struct atfork { } atfork_t; /* - * Element in the table of registered process robust locks. - * We keep track of these to make sure that we only call - * ___lwp_mutex_register() once for each such lock. + * Element in the table and in the list of registered process + * robust locks. We keep track of these to make sure that we + * only call ___lwp_mutex_register() once for each such lock + * after it is first mapped in (or newly mapped in). */ typedef struct robust { - struct robust *robust_next; + struct robust *robust_next; /* hash table list */ + struct robust *robust_list; /* global list */ mutex_t *robust_lock; } robust_t; /* + * Invalid address, used to mark an unused element in the hash table. + */ +#define INVALID_ADDR ((void *)(uintptr_t)(-1L)) + +/* * Parameters of the lock registration hash table. */ #define LOCKSHIFT 15 /* number of hashing bits */ @@ -888,6 +895,7 @@ typedef struct uberdata { ulwp_t *ulwp_replace_last; atfork_t *atforklist; /* circular Q for fork handlers */ robust_t **robustlocks; /* table of registered robust locks */ + robust_t *robustlist; /* list of registered robust locks */ struct uberdata **tdb_bootstrap; tdb_t tdb; /* thread debug interfaces (for libc_db) */ } uberdata_t; @@ -1096,6 +1104,7 @@ typedef struct uberdata32 { caddr32_t ulwp_replace_last; caddr32_t atforklist; caddr32_t robustlocks; + caddr32_t robustlist; caddr32_t tdb_bootstrap; tdb32_t tdb; } uberdata32_t; @@ -1207,7 +1216,8 @@ extern void record_spin_locks(ulwp_t *); extern void remember_lock(mutex_t *); extern void forget_lock(mutex_t *); extern void register_lock(mutex_t *); -extern void unregister_locks(void); +extern void unregister_locks(caddr_t, size_t); +extern void unregister_all_locks(void); #if defined(__sparc) extern void _flush_windows(void); #else |