* sync.h (muto::initforce): Delete flawed implementation.
* pwdgrp.h (pwdgrp::pglock): Make static. * grp.cc (pwdgrp::pwdgrp): Eliminate use of initforce.
This commit is contained in:
		| @@ -1,3 +1,9 @@ | |||||||
|  | 2005-04-05  Christopher Faylor  <cgf@timesys.com> | ||||||
|  |  | ||||||
|  | 	* sync.h (muto::initforce): Delete flawed implementation. | ||||||
|  | 	* pwdgrp.h (pwdgrp::pglock): Make static. | ||||||
|  | 	* grp.cc (pwdgrp::pwdgrp): Eliminate use of initforce. | ||||||
|  |  | ||||||
| 2005-04-05  Christopher Faylor  <cgf@timesys.com> | 2005-04-05  Christopher Faylor  <cgf@timesys.com> | ||||||
|  |  | ||||||
| 	* sync.h (muto::initforce): Force initialization even when name != | 	* sync.h (muto::initforce): Force initialization even when name != | ||||||
|   | |||||||
| @@ -106,12 +106,14 @@ pwdgrp::read_group () | |||||||
|   return; |   return; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | muto NO_COPY pwdgrp::pglock; | ||||||
|  |  | ||||||
| pwdgrp::pwdgrp (passwd *&pbuf) : | pwdgrp::pwdgrp (passwd *&pbuf) : | ||||||
|   pwdgrp_buf_elem_size (sizeof (*pbuf)), passwd_buf (&pbuf) |   pwdgrp_buf_elem_size (sizeof (*pbuf)), passwd_buf (&pbuf) | ||||||
| { | { | ||||||
|   read = &pwdgrp::read_passwd; |   read = &pwdgrp::read_passwd; | ||||||
|   parse = &pwdgrp::parse_passwd; |   parse = &pwdgrp::parse_passwd; | ||||||
|   pglock.initforce ("pwd_lock"); |   pglock.init ("pglock"); | ||||||
| } | } | ||||||
|  |  | ||||||
| pwdgrp::pwdgrp (__group32 *&gbuf) : | pwdgrp::pwdgrp (__group32 *&gbuf) : | ||||||
| @@ -119,7 +121,7 @@ pwdgrp::pwdgrp (__group32 *&gbuf) : | |||||||
| { | { | ||||||
|   read = &pwdgrp::read_group; |   read = &pwdgrp::read_group; | ||||||
|   parse = &pwdgrp::parse_group; |   parse = &pwdgrp::parse_group; | ||||||
|   pglock.initforce ("grp_lock"); |   pglock.init ("pglock"); | ||||||
| } | } | ||||||
|  |  | ||||||
| struct __group32 * | struct __group32 * | ||||||
|   | |||||||
| @@ -39,7 +39,7 @@ class pwdgrp | |||||||
|   char *buf, *lptr; |   char *buf, *lptr; | ||||||
|   int max_lines; |   int max_lines; | ||||||
|   bool initialized; |   bool initialized; | ||||||
|   muto pglock; |   static muto pglock; | ||||||
|  |  | ||||||
|   bool parse_passwd (); |   bool parse_passwd (); | ||||||
|   bool parse_group (); |   bool parse_group (); | ||||||
|   | |||||||
| @@ -70,7 +70,7 @@ Static char cprocs[(NPROCS + 1) * sizeof (pinfo)];// All my children info | |||||||
| 					// constructor operation  at DLL startup | 					// constructor operation  at DLL startup | ||||||
| Static waitq waitq_head = {0, 0, 0, 0, 0, 0, 0};// Start of queue for wait'ing threads | Static waitq waitq_head = {0, 0, 0, 0, 0, 0, 0};// Start of queue for wait'ing threads | ||||||
|  |  | ||||||
| muto NO_COPY sync_proc_subproc;		// Control access to subproc stuff | static muto NO_COPY sync_proc_subproc;	// Control access to subproc stuff | ||||||
|  |  | ||||||
| DWORD NO_COPY sigtid = 0;		// ID of the signal thread | DWORD NO_COPY sigtid = 0;		// ID of the signal thread | ||||||
|  |  | ||||||
|   | |||||||
| @@ -28,7 +28,6 @@ public: | |||||||
|   void *tls;	/* Tls of lock owner. */ |   void *tls;	/* Tls of lock owner. */ | ||||||
|   // class muto *next; |   // class muto *next; | ||||||
|  |  | ||||||
|   muto *initforce (const char *s) {name = NULL; return init (s);} |  | ||||||
|   /* The real constructor. */ |   /* The real constructor. */ | ||||||
|   muto *init (const char *) __attribute__ ((regparm (2))); |   muto *init (const char *) __attribute__ ((regparm (2))); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user