mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-28 12:05:47 +08:00
* fhandler.cc (fhandler_base::open): Move some filesystem specific stuff.
(fhandler_disk_file::open): Accept some filesystem specific stuff. * sigproc.cc (wait_for_sigthread): Become slightly more thread safe. (sig_send): Don't assume that signal thread is ready.
This commit is contained in:
parent
d4806224b6
commit
5cd8241242
@ -1,3 +1,11 @@
|
|||||||
|
2003-02-19 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* fhandler.cc (fhandler_base::open): Move some filesystem specific
|
||||||
|
stuff.
|
||||||
|
(fhandler_disk_file::open): Accept some filesystem specific stuff.
|
||||||
|
* sigproc.cc (wait_for_sigthread): Become slightly more thread safe.
|
||||||
|
(sig_send): Don't assume that signal thread is ready.
|
||||||
|
|
||||||
2003-02-20 Corinna Vinschen <corinna@vinschen.de>
|
2003-02-20 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* wincap.h (wincap): Remove unnecessary definition of
|
* wincap.h (wincap): Remove unnecessary definition of
|
||||||
|
@ -455,10 +455,6 @@ fhandler_base::open (path_conv *pc, int flags, mode_t mode)
|
|||||||
x = CreateFile (get_win32_name (), access, shared, &sa, creation_distribution,
|
x = CreateFile (get_win32_name (), access, shared, &sa, creation_distribution,
|
||||||
file_attributes, 0);
|
file_attributes, 0);
|
||||||
|
|
||||||
syscall_printf ("%p = CreateFile (%s, %p, %p, %p, %p, %p, 0)",
|
|
||||||
x, get_win32_name (), access, shared, &sa,
|
|
||||||
creation_distribution, file_attributes);
|
|
||||||
|
|
||||||
if (x == INVALID_HANDLE_VALUE)
|
if (x == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
if (!wincap.can_open_directories () && pc && pc->isdir ())
|
if (!wincap.can_open_directories () && pc && pc->isdir ())
|
||||||
@ -478,13 +474,9 @@ fhandler_base::open (path_conv *pc, int flags, mode_t mode)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Attributes may be set only if a file is _really_ created.
|
syscall_printf ("%p = CreateFile (%s, %p, %p, %p, %p, %p, 0)",
|
||||||
This code is now only used for ntea here since the files
|
x, get_win32_name (), access, shared, &sa,
|
||||||
security attributes are set in CreateFile () now. */
|
creation_distribution, file_attributes);
|
||||||
if (flags & O_CREAT && get_device () == FH_DISK
|
|
||||||
&& GetLastError () != ERROR_ALREADY_EXISTS
|
|
||||||
&& !allow_ntsec && allow_ntea)
|
|
||||||
set_file_attribute (has_acls (), get_win32_name (), mode);
|
|
||||||
|
|
||||||
set_io_handle (x);
|
set_io_handle (x);
|
||||||
set_flags (flags, pc ? pc->binmode () : 0);
|
set_flags (flags, pc ? pc->binmode () : 0);
|
||||||
|
@ -400,6 +400,14 @@ fhandler_disk_file::open (path_conv *real_path, int flags, mode_t mode)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Attributes may be set only if a file is _really_ created.
|
||||||
|
This code is now only used for ntea here since the files
|
||||||
|
security attributes are set in CreateFile () now. */
|
||||||
|
if (flags & O_CREAT
|
||||||
|
&& GetLastError () != ERROR_ALREADY_EXISTS
|
||||||
|
&& !allow_ntsec && allow_ntea)
|
||||||
|
set_file_attribute (has_acls (), get_win32_name (), mode);
|
||||||
|
|
||||||
/* Set newly created and truncated files as sparse files. */
|
/* Set newly created and truncated files as sparse files. */
|
||||||
if ((real_path->fs_flags () & FILE_SUPPORTS_SPARSE_FILES)
|
if ((real_path->fs_flags () & FILE_SUPPORTS_SPARSE_FILES)
|
||||||
&& (get_access () & GENERIC_WRITE) == GENERIC_WRITE
|
&& (get_access () & GENERIC_WRITE) == GENERIC_WRITE
|
||||||
|
@ -170,10 +170,12 @@ out:
|
|||||||
void __stdcall
|
void __stdcall
|
||||||
wait_for_sigthread ()
|
wait_for_sigthread ()
|
||||||
{
|
{
|
||||||
assert (wait_sig_inited);
|
sigproc_printf ("wait_sig_inited %p", wait_sig_inited);
|
||||||
(void) WaitForSingleObject (wait_sig_inited, INFINITE);
|
HANDLE hsig_inited = wait_sig_inited;
|
||||||
(void) ForceCloseHandle (wait_sig_inited);
|
assert (hsig_inited);
|
||||||
|
(void) WaitForSingleObject (hsig_inited, INFINITE);
|
||||||
wait_sig_inited = NULL;
|
wait_sig_inited = NULL;
|
||||||
|
(void) ForceCloseHandle1 (hsig_inited, wait_sig_inited);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the sync_proc_subproc muto to control access to
|
/* Get the sync_proc_subproc muto to control access to
|
||||||
@ -654,7 +656,8 @@ sig_send (_pinfo *p, int sig, DWORD ebp, bool exception)
|
|||||||
{
|
{
|
||||||
if (no_signals_available ())
|
if (no_signals_available ())
|
||||||
goto out; // Either exiting or not yet initializing
|
goto out; // Either exiting or not yet initializing
|
||||||
assert (!wait_sig_inited);
|
if (wait_sig_inited)
|
||||||
|
wait_for_sigthread ();
|
||||||
wait_for_completion = p != myself_nowait;
|
wait_for_completion = p != myself_nowait;
|
||||||
p = myself;
|
p = myself;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user