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>2001-04-21 18:23:47 +0400
committerRobert Collins <rbtcollins@hotmail.com>2001-04-21 18:23:47 +0400
commit9450ad0d02bb36c663d09a2fd486506de030ff08 (patch)
tree2785eebe37b5eadc1a9610260d238f5c1cc5086c /winsup/cygwin/passwd.cc
parent8c9df1d571708c654822dd55e67e8d7ffc989dc5 (diff)
Sun Apr 22 20:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
* passwd.cc (getpwuid): Check for thread cancellation. (getpwuid_r): Ditto. (getpwname): Ditto. (getpwnam_r): Ditto. * thread.h (pthread_mutex): New constructors for pshared operation. (MTinterface): Associative array for pshared mutex's. * thread.cc (MTinterface::Init): Initailize pshared mutex array. (pthread_cond::BroadCast): Implementation notes. (pthread_cond::TimedWait): Remove use of SignalObjectAndWait on non-NT systems. (pthread_mutex::pthread_mutex(unsigned short)): New function. (pthread_mutex::pthread_mutex (pthread_mutex_t *, pthread_mutexattr *)):New function. (pthread_mutex::pthread_mutex(pthread_mutexattr *)): Fail on pshared mutex's. (__pthread_mutex_getpshared): New function. (__pthread_join): Check for thread cancellation. (__pthread_cond_timedwait): Support pshared mutex's. (__pthread_cond_wait): Ditto. (__pthread_condattr_setpshared): Error on PROCESS_SHARED requests. (__pthread_mutex_init): Support pshared mutex's. (__pthread_mutex_getprioceiling): Ditto. (__pthread_mutex_lock): Ditto. (__pthread_mutex_trylock): Ditto. (__pthread_mutex_unlock): Ditto. (__pthread_mutex_destroy): Ditto. (__pthread_mutex_setprioceiling): Ditto. (__pthread_mutexattr_setpshared): Support PTHREAD_PROCESS_PSHARED requests.
Diffstat (limited to 'winsup/cygwin/passwd.cc')
-rw-r--r--winsup/cygwin/passwd.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc
index 6164b0930..319ebbbcd 100644
--- a/winsup/cygwin/passwd.cc
+++ b/winsup/cygwin/passwd.cc
@@ -205,6 +205,8 @@ getpwuid (uid_t uid)
{
if (passwd_state <= initializing)
read_etc_passwd ();
+
+ pthread_testcancel();
return search_for (uid, 0);
}
@@ -220,6 +222,8 @@ getpwuid_r (uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize, struct
if (passwd_state <= initializing)
read_etc_passwd ();
+ pthread_testcancel();
+
struct passwd *temppw = search_for (uid, 0);
if (!temppw)
@@ -248,6 +252,8 @@ getpwnam (const char *name)
{
if (passwd_state <= initializing)
read_etc_passwd ();
+
+ pthread_testcancel();
return search_for (0, name);
}
@@ -268,6 +274,8 @@ getpwnam_r (const char *nam, struct passwd *pwd, char *buffer, size_t bufsize, s
if (passwd_state <= initializing)
read_etc_passwd ();
+ pthread_testcancel();
+
struct passwd *temppw = search_for (0, nam);
if (!temppw)