Eliminate trailing whitespace in some files.
* dll_init.cc (dll_list::alloc): Reset 'p' in forked process. * select.cc (select_stuff::wait): Move cleanup() closer to WFMO to minimize unavoidable (?) race.
This commit is contained in:
parent
138f3e0cbd
commit
8978381c2a
|
@ -1,3 +1,10 @@
|
||||||
|
2011-05-02 Christopher Faylor <me.cygwin2011@cgf.cx>
|
||||||
|
|
||||||
|
* dll_init.cc (dll_list::alloc): Reset 'p' in forked process.
|
||||||
|
|
||||||
|
* select.cc (select_stuff::wait): Move cleanup() closer to WFMO to
|
||||||
|
minimize unavoidable (?) race.
|
||||||
|
|
||||||
2011-05-02 Corinna Vinschen <corinna@vinschen.de>
|
2011-05-02 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler_serial.cc (fhandler_serial::raw_read): Add restartability
|
* fhandler_serial.cc (fhandler_serial::raw_read): Add restartability
|
||||||
|
|
|
@ -126,6 +126,7 @@ dll_list::alloc (HINSTANCE h, per_process *p, dll_type type)
|
||||||
{
|
{
|
||||||
if (!in_forkee)
|
if (!in_forkee)
|
||||||
d->count++; /* Yes. Bump the usage count. */
|
d->count++; /* Yes. Bump the usage count. */
|
||||||
|
d->p = p;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -131,7 +131,7 @@ fs_info_cache::genhash (PFILE_FS_VOLUME_INFORMATION pffvi)
|
||||||
{
|
{
|
||||||
uint32_t hash = 0;
|
uint32_t hash = 0;
|
||||||
const uint16_t *p = (const uint16_t *) pffvi;
|
const uint16_t *p = (const uint16_t *) pffvi;
|
||||||
const uint16_t *end = (const uint16_t *)
|
const uint16_t *end = (const uint16_t *)
|
||||||
((const uint8_t *) p + sizeof *pffvi
|
((const uint8_t *) p + sizeof *pffvi
|
||||||
+ pffvi->VolumeLabelLength - sizeof (WCHAR));
|
+ pffvi->VolumeLabelLength - sizeof (WCHAR));
|
||||||
pffvi->__dummy = 0; /* This member can have random values! */
|
pffvi->__dummy = 0; /* This member can have random values! */
|
||||||
|
@ -378,7 +378,7 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
|
||||||
any remote CIFS. */
|
any remote CIFS. */
|
||||||
has_buggy_fileid_dirinfo (is_cifs () || is_unixfs ());
|
has_buggy_fileid_dirinfo (is_cifs () || is_unixfs ());
|
||||||
/* NWFS is known to have a broken FileBasicInformation info class.
|
/* NWFS is known to have a broken FileBasicInformation info class.
|
||||||
It can't be used to fetch information, only to set information.
|
It can't be used to fetch information, only to set information.
|
||||||
Therefore, for NWFS we have to fallback to the
|
Therefore, for NWFS we have to fallback to the
|
||||||
FileNetworkOpenInformation info class. Unfortunately we can't
|
FileNetworkOpenInformation info class. Unfortunately we can't
|
||||||
use FileNetworkOpenInformation all the time since that fails on
|
use FileNetworkOpenInformation all the time since that fails on
|
||||||
|
@ -1055,7 +1055,7 @@ fstab_read_flags (char **options, unsigned &flags, bool external)
|
||||||
*p++ = '\0';
|
*p++ = '\0';
|
||||||
else
|
else
|
||||||
p = strchr (*options, '\0');
|
p = strchr (*options, '\0');
|
||||||
|
|
||||||
key.name = *options;
|
key.name = *options;
|
||||||
opt *o = (opt *) bsearch (&key, oopts,
|
opt *o = (opt *) bsearch (&key, oopts,
|
||||||
sizeof oopts / sizeof (opt),
|
sizeof oopts / sizeof (opt),
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/* pseudo-reloc.c
|
/* pseudo-reloc.cc
|
||||||
|
|
||||||
Contributed by Egor Duda <deo@logos-m.ru>
|
Contributed by Egor Duda <deo@logos-m.ru>
|
||||||
Modified by addition of runtime_pseudo_reloc version 2
|
Modified by addition of runtime_pseudo_reloc version 2
|
||||||
by Kai Tietz <kai.tietz@onevision.com>
|
by Kai Tietz <kai.tietz@onevision.com>
|
||||||
|
|
||||||
THIS SOFTWARE IS NOT COPYRIGHTED
|
THIS SOFTWARE IS NOT COPYRIGHTED
|
||||||
|
|
||||||
This source code is offered for use in the public domain. You may
|
This source code is offered for use in the public domain. You may
|
||||||
|
|
|
@ -146,7 +146,6 @@ cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||||
else if ((timeout = sel.wait (r, w, e, ms) < 0))
|
else if ((timeout = sel.wait (r, w, e, ms) < 0))
|
||||||
return -1; /* some kind of error */
|
return -1; /* some kind of error */
|
||||||
|
|
||||||
sel.cleanup ();
|
|
||||||
copyfd_set (readfds, r, maxfds);
|
copyfd_set (readfds, r, maxfds);
|
||||||
copyfd_set (writefds, w, maxfds);
|
copyfd_set (writefds, w, maxfds);
|
||||||
copyfd_set (exceptfds, e, maxfds);
|
copyfd_set (exceptfds, e, maxfds);
|
||||||
|
@ -290,7 +289,7 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||||
wait_ret = WaitForMultipleObjects (m, w4, FALSE, ms);
|
wait_ret = WaitForMultipleObjects (m, w4, FALSE, ms);
|
||||||
else
|
else
|
||||||
/* Using MWMO_INPUTAVAILABLE is the officially supported solution for
|
/* Using MWMO_INPUTAVAILABLE is the officially supported solution for
|
||||||
the problem that the call to PeekMessage disarms the queue state
|
the problem that the call to PeekMessage disarms the queue state
|
||||||
so that a subsequent MWFMO hangs, even if there are still messages
|
so that a subsequent MWFMO hangs, even if there are still messages
|
||||||
in the queue. */
|
in the queue. */
|
||||||
wait_ret =
|
wait_ret =
|
||||||
|
@ -301,15 +300,18 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||||
switch (wait_ret)
|
switch (wait_ret)
|
||||||
{
|
{
|
||||||
case WAIT_OBJECT_0:
|
case WAIT_OBJECT_0:
|
||||||
|
cleanup ();
|
||||||
select_printf ("signal received");
|
select_printf ("signal received");
|
||||||
set_sig_errno (EINTR);
|
set_sig_errno (EINTR);
|
||||||
return -1;
|
return -1;
|
||||||
case WAIT_FAILED:
|
case WAIT_FAILED:
|
||||||
|
cleanup ();
|
||||||
system_printf ("WaitForMultipleObjects failed");
|
system_printf ("WaitForMultipleObjects failed");
|
||||||
s = &start;
|
s = &start;
|
||||||
s->set_select_errno ();
|
s->set_select_errno ();
|
||||||
return -1;
|
return -1;
|
||||||
case WAIT_TIMEOUT:
|
case WAIT_TIMEOUT:
|
||||||
|
cleanup ();
|
||||||
select_printf ("timed out");
|
select_printf ("timed out");
|
||||||
res = 1;
|
res = 1;
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -325,6 +327,7 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||||
while ((s = s->next))
|
while ((s = s->next))
|
||||||
if (s->saw_error ())
|
if (s->saw_error ())
|
||||||
{
|
{
|
||||||
|
cleanup ();
|
||||||
set_errno (s->saw_error ());
|
set_errno (s->saw_error ());
|
||||||
return -1; /* Somebody detected an error */
|
return -1; /* Somebody detected an error */
|
||||||
}
|
}
|
||||||
|
@ -334,7 +337,10 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||||
|
|
||||||
select_printf ("gotone %d", gotone);
|
select_printf ("gotone %d", gotone);
|
||||||
if (gotone)
|
if (gotone)
|
||||||
goto out;
|
{
|
||||||
|
cleanup ();
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (ms == INFINITE)
|
if (ms == INFINITE)
|
||||||
{
|
{
|
||||||
|
@ -346,6 +352,7 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||||
LONGLONG now = gtod.msecs ();
|
LONGLONG now = gtod.msecs ();
|
||||||
if (now > (start_time + ms))
|
if (now > (start_time + ms))
|
||||||
{
|
{
|
||||||
|
cleanup ();
|
||||||
select_printf ("timed out after verification");
|
select_printf ("timed out after verification");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,12 +50,12 @@ static LONG installation_root_inited __attribute__((section (".cygwin_dll_common
|
||||||
used when generating shared object names. Thus, different Cygwin
|
used when generating shared object names. Thus, different Cygwin
|
||||||
installations generate different object names and so are isolated from
|
installations generate different object names and so are isolated from
|
||||||
each other.
|
each other.
|
||||||
|
|
||||||
Having this information, the installation key together with the
|
Having this information, the installation key together with the
|
||||||
installation root path is written to the registry. The idea is that
|
installation root path is written to the registry. The idea is that
|
||||||
cygcheck can print the paths into which the Cygwin DLL has been
|
cygcheck can print the paths into which the Cygwin DLL has been
|
||||||
installed for debugging purposes.
|
installed for debugging purposes.
|
||||||
|
|
||||||
Last but not least, the new cygwin properties datastrcuture is checked
|
Last but not least, the new cygwin properties datastrcuture is checked
|
||||||
for the "disabled_key" value, which is used to determine whether the
|
for the "disabled_key" value, which is used to determine whether the
|
||||||
installation key is actually added to all object names or not. This is
|
installation key is actually added to all object names or not. This is
|
||||||
|
@ -373,7 +373,7 @@ shared_info::init_obcaseinsensitive ()
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
DWORD def_obcaseinsensitive = 1;
|
DWORD def_obcaseinsensitive = 1;
|
||||||
|
|
||||||
obcaseinsensitive = def_obcaseinsensitive;
|
obcaseinsensitive = def_obcaseinsensitive;
|
||||||
RTL_QUERY_REGISTRY_TABLE tab[2] = {
|
RTL_QUERY_REGISTRY_TABLE tab[2] = {
|
||||||
{ NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING,
|
{ NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING,
|
||||||
|
|
|
@ -600,7 +600,7 @@ sys_cp_mbstowcs (mbtowc_p f_mbtowc, const char *charset, wchar_t *dst,
|
||||||
|
|
||||||
Invalid bytes in a multibyte secuence are converted to
|
Invalid bytes in a multibyte secuence are converted to
|
||||||
the private use area which is already used to store ASCII
|
the private use area which is already used to store ASCII
|
||||||
chars invalid in Windows filenames. This technque allows
|
chars invalid in Windows filenames. This technque allows
|
||||||
to store them in a symmetric way. */
|
to store them in a symmetric way. */
|
||||||
bytes = 1;
|
bytes = 1;
|
||||||
if (dst)
|
if (dst)
|
||||||
|
|
|
@ -513,7 +513,7 @@ hires_ms::timeGetTime_ns ()
|
||||||
of the value returned by timeGetTime, only relative accuracy, we can skip
|
of the value returned by timeGetTime, only relative accuracy, we can skip
|
||||||
this step. However, if we ever find out that we need absolute accuracy,
|
this step. However, if we ever find out that we need absolute accuracy,
|
||||||
here's how it works in it's full beauty:
|
here's how it works in it's full beauty:
|
||||||
|
|
||||||
- At process startup, winmm initializes two calibration values:
|
- At process startup, winmm initializes two calibration values:
|
||||||
|
|
||||||
DWORD tick_count_start;
|
DWORD tick_count_start;
|
||||||
|
|
Loading…
Reference in New Issue