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.
This commit is contained in:
@@ -80,7 +80,6 @@ bool NO_COPY cygwin_finished_initializing;
|
||||
measure to allow an orderly transfer to the new, correct sigmask method. */
|
||||
unsigned NO_COPY int signal_shift_subtract = 1;
|
||||
|
||||
ResourceLocks _reslock NO_COPY;
|
||||
MTinterface _mtinterf;
|
||||
|
||||
bool NO_COPY _cygwin_testing;
|
||||
@@ -113,8 +112,8 @@ extern "C"
|
||||
/* hmodule */ NULL,
|
||||
/* api_major */ CYGWIN_VERSION_API_MAJOR,
|
||||
/* api_minor */ CYGWIN_VERSION_API_MINOR,
|
||||
/* unused2 */ {0, 0, 0, 0, 0},
|
||||
/* resourcelocks */ &_reslock, /* threadinterface */ &_mtinterf,
|
||||
/* unused2 */ {0, 0, 0, 0, 0, 0},
|
||||
/* threadinterface */ &_mtinterf,
|
||||
/* impure_ptr */ _GLOBAL_REENT,
|
||||
};
|
||||
bool ignore_case_with_glob;
|
||||
@@ -759,7 +758,6 @@ dll_crt0_0 ()
|
||||
}
|
||||
}
|
||||
|
||||
user_data->resourcelocks->Init ();
|
||||
user_data->threadinterface->Init ();
|
||||
|
||||
_cygtls::init ();
|
||||
|
Reference in New Issue
Block a user