diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c5b3c610c..212fe89a3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2005-04-05 Christopher Faylor + + * sync.h (muto::initforce): Force initialization even when name != + NULL. + * grp.cc (pwdgrp::pwdgrp): Use initforce since the enclosing structure + is !NO_COPY. + 2005-04-05 Christopher Faylor * sync.h (muto::operator int): New operator. diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index 5f45a31b3..190d9cb26 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -111,7 +111,7 @@ pwdgrp::pwdgrp (passwd *&pbuf) : { read = &pwdgrp::read_passwd; parse = &pwdgrp::parse_passwd; - pglock.init ("pwd_lock"); + pglock.initforce ("pwd_lock"); } pwdgrp::pwdgrp (__group32 *&gbuf) : @@ -119,7 +119,7 @@ pwdgrp::pwdgrp (__group32 *&gbuf) : { read = &pwdgrp::read_group; parse = &pwdgrp::parse_group; - pglock.init ("grp_lock"); + pglock.initforce ("grp_lock"); } struct __group32 * diff --git a/winsup/cygwin/sync.h b/winsup/cygwin/sync.h index 441892a08..13fa33caf 100644 --- a/winsup/cygwin/sync.h +++ b/winsup/cygwin/sync.h @@ -28,6 +28,7 @@ public: void *tls; /* Tls of lock owner. */ // class muto *next; + muto *initforce (const char *s) {name = NULL; return init (s);} /* The real constructor. */ muto *init (const char *) __attribute__ ((regparm (2)));