diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-11-27 14:45:14 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-11-27 14:45:14 +0000 |
commit | a1591d3be7fefcec8056bf5f74be0590fb356605 (patch) | |
tree | 91efdab7419ce063dac8b9e7d798f32c5ee7e8be /winsup/cygwin/include/sys/cygwin.h | |
parent | 230a3c86d1f40fba642bd7a68ca88878163bcd5f (diff) | |
download | cygnal-a1591d3be7fefcec8056bf5f74be0590fb356605.tar.gz cygnal-a1591d3be7fefcec8056bf5f74be0590fb356605.tar.bz2 cygnal-a1591d3be7fefcec8056bf5f74be0590fb356605.zip |
Drop old SetResourceLock stuff in favor of mutos.
* dcrt0.cc (_reslock): Remove.
(__cygwin_user_data): Accommodate removal of resourcelocks member.
(dll_crt0_0): Don't initialize resourcelocks.
* exceptions.cc (_cygtls::signal_exit): Drop resourcelocks handling.
* mmap.cc (mmap_guard): New muto.
(LIST_LOCK): Define.
(LIST_UNLOCK): Define.
(mmap_list::search_record): Remove.
(mmap_list::try_map): Include code for anonymous case from
mmap_list::search_record.
(mmap_is_attached_or_noreserve): Access bookkeeping lists in a thread
safe way.
(mmap64): Replace SetResourceLock/ReleaseResourceLock by
LIST_LOCK/LIST_UNLOCK. Lock at the latest possible point.
(munmap): Replace SetResourceLock/ReleaseResourceLock by
LIST_LOCK/LIST_UNLOCK.
(msync): Ditto.
(mprotect): Ditto.
* thread.cc (ResourceLocks::Lock): Remove.
(SetResourceLock): Remove.
(ReleaseResourceLock): Remove.
(ResourceLocks::Init): Remove.
(ResourceLocks::Delete): Remove.
* thread.h (SetResourceLock): Drop declaration.
(ReleaseResourceLock): Ditto.
(class ResourceLocks): Drop definition.
* include/sys/cygwin.h (class ResourceLocks): Drop forward declaration.
(struct per_process): Replace resourcelocks with additional unused2
element.
(per_process_overwrite): Accommodate above change.
Diffstat (limited to 'winsup/cygwin/include/sys/cygwin.h')
-rw-r--r-- | winsup/cygwin/include/sys/cygwin.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h index 7cc36c434..7fe4a1377 100644 --- a/winsup/cygwin/include/sys/cygwin.h +++ b/winsup/cygwin/include/sys/cygwin.h @@ -140,7 +140,6 @@ extern HANDLE cygwin_logon_user (const struct passwd *, const char *); */ #ifdef __cplusplus -class ResourceLocks; class MTinterface; #endif @@ -198,18 +197,16 @@ struct per_process DWORD api_minor; /* linked with */ /* For future expansion, so apps won't have to be relinked if we add an item. */ - DWORD unused2[5]; + DWORD unused2[6]; #if defined (__INSIDE_CYGWIN__) && defined (__cplusplus) - ResourceLocks *resourcelocks; MTinterface *threadinterface; #else - void *resourcelocks; void *threadinterface; #endif struct _reent *impure_ptr; }; -#define per_process_overwrite ((unsigned) &(((struct per_process *) NULL)->resourcelocks)) +#define per_process_overwrite ((unsigned) &(((struct per_process *) NULL)->threadinterface)) extern void cygwin_premain0 (int argc, char **argv, struct per_process *); extern void cygwin_premain1 (int argc, char **argv, struct per_process *); |