Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Collins <rbtcollins@hotmail.com>2002-03-03 15:42:03 +0300
committerRobert Collins <rbtcollins@hotmail.com>2002-03-03 15:42:03 +0300
commit2c9004bfe2b24b6f8337c6730eadc295181ed69b (patch)
tree3e867d4ac58a59916c9021f69006e59f764a1d11 /winsup/cygwin
parentba0131e10b2c1d16ba05cd4eaf570f94ee545f4b (diff)
Merged changes from HEAD
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog33
-rw-r--r--winsup/cygwin/thread.cc15
-rw-r--r--winsup/cygwin/times.cc25
3 files changed, 40 insertions, 33 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 3770a2ac8..1b8bbb9ea 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,11 @@
+2002-02-28 Christopher Faylor <cgf@redhat.com>
+
+ * times.cc: Remove if 0'd code. Clean up slightly.
+
+2002-02-28 Robert Collins <rbtcollins@hotmail.com>
+
+ * Merged cygwin_daemon into head minus the new shm and ipc exports.
+
2002-02-28 Robert Collins <rbtcollins@hotmail.com>
* fhandler_tty.cc (fhandler_tty_slave::open): More debugging.
@@ -162,7 +170,8 @@ Mon Oct 1 12:38:00 2001 Robert Collins <rbtcollins@hotmail.com>
(process_cache::process): Use the critical section. Also add missing entries to
the cache.
(do_process_init): New function to initalise class process static variables.
- (process::process): Ensure that the process access critical section is initialised.
+ (process::process): Ensure that the process access critical section is
+ initialised.
(process::handle): Close the handle of old process's when they have terminated
and we are returning the handle for a process with the same pid.
* cygserver_shm.cc: Run indent.
@@ -170,10 +179,14 @@ Mon Oct 1 12:38:00 2001 Robert Collins <rbtcollins@hotmail.com>
(client_request_shm_get::serve): New parameter for process cache support.
Use the process cache, not OpenProcess to get a handle to the originating process.
Fix a handle leak with token_handle.
- * cygserver_shm.h (class client_request_shm_get): Update ::serve for process cache support.
+ * cygserver_shm.h (class client_request_shm_get): Update ::serve for process
+ cache support.
* cygserver_transport_pipes.cc: Redefine debug_printf to be conditional on DEBUG.
- * include/cygwin/cygserver.h: Do not implement client_request::serve in the header.
- * include/cygwin/cygserver_process.h (class process_cache): Add a write access critical section to prevent races when requests from a multithreaded application arrive.
+ * include/cygwin/cygserver.h: Do not implement client_request::serve in the
+ header.
+ * include/cygwin/cygserver_process.h (class process_cache): Add a write access
+ critical section to prevent races when requests from a multithreaded
+ application arrive.
Sun Sep 30 23:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
@@ -192,7 +205,8 @@ Sun Sep 30 23:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
(server_request_queue::process_requests): Initiator for threaded request loops.
(client_request_shutdown::serve): Add beginning of process cache support.
(server_request::server_request): Ditto.
- (server_request::process): Use debug_printf. Add beginning of process cache support.
+ (server_request::process): Use debug_printf. Add beginning of process cache
+ support.
(server_request_queue::cleanup): Kill off any request loop threads.
(server_request_queue::add): Add beginning of process cache support.
(handle_signal): Trigger a shutdown.
@@ -200,7 +214,8 @@ Sun Sep 30 23:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
Add process cache support.
Spawn a separate thread for the transport request loop, thus allowing concurrent
support for multiple transports.
- * cygserver_client.cc (client_request_get_version::serve): Add process cache support.
+ * cygserver_client.cc (client_request_get_version::serve): Add process cache
+ support.
(client_request_attach_tty::serve): Add process cache support.
(client_request_shutdown::serve): Add process cache support.
* cygsserver_process.cc: New file with the process cache support.
@@ -278,6 +293,12 @@ Tue Sep 25 16:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
* include/sys/ipc.h: New file.
* include/sys/shm.h: New file.
+2002-02-28 Robert Collins <rbtcollins@hotmail.com>
+
+ * thread.cc (semaphore::TryWait): Set errno as required by posix 1003.1.
+ (__sem_wait): Ditto.
+ (__sem_trywait): Ditto.
+
2002-02-27 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number.
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index ced5f6f80..5c44ca90a 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -807,7 +807,10 @@ semaphore::TryWait ()
*We probably need WaitForMultipleObjects here.
*/
if (WaitForSingleObject (win32_obj_id, 0) == WAIT_TIMEOUT)
- return EAGAIN;
+ {
+ set_errno (EAGAIN);
+ return -1;
+ }
currentvalue--;
return 0;
}
@@ -2213,7 +2216,10 @@ int
__sem_wait (sem_t *sem)
{
if (verifyable_object_isvalid (sem, SEM_MAGIC) != VALID_OBJECT)
- return EINVAL;
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
(*sem)->Wait ();
return 0;
@@ -2223,7 +2229,10 @@ int
__sem_trywait (sem_t *sem)
{
if (verifyable_object_isvalid (sem, SEM_MAGIC) != VALID_OBJECT)
- return EINVAL;
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
return (*sem)->TryWait ();
}
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index 9674d1031..b7308bf02 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -170,28 +170,6 @@ _gettimeofday (struct timeval *p, struct timezone *z)
return gettimeofday (p, z);
}
-#if 0
-/* Work out magic constant below */
-genf ()
-{
- SYSTEMTIME s;
- FILETIME f;
- s.wYear = 1970;
- s.wMonth = 1;
- s.wDayOfWeek = 4;
- s.wDay = 1;
- s.wHour = 0;
- s.wMinute = 0;
- s.wSecond = 0;
- s.wMilliseconds = 0;
- SystemTimeToFileTime (&s, &f);
-
- small_printf ("FILE TIME is %08x%08x\n",
- f.dwHighDateTime,
- f.dwLowDateTime);
-}
-#endif
-
/* Cygwin internal */
void
time_t_to_filetime (time_t time_in, FILETIME *out)
@@ -552,8 +530,7 @@ ftime (struct timeb *tp)
}
/* obsolete, changed to cygwin_tzset when localtime.c was added - dj */
-extern "C"
-void
+extern "C" void
cygwin_tzset ()
{
}