Mail Archives: cygwin-developers/2001/04/22/19:36:48
Ok if I check this in?
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/ChangeLog,v
retrieving revision 1.657
diff -u -p -r1.657 ChangeLog
--- ChangeLog 2001/04/22 23:18:27 1.657
+++ ChangeLog 2001/04/22 23:36:31
@@ -1,3 +1,7 @@
+Mon Apr 23 9:27:00 2001 Robert Collins <rbtcollins AT hotmail DOT com>
+
+ * thread.cc (MTinterface::Init): Always initialise per process
variables.
+
Sun Apr 22 19:18:18 2001 Christopher Faylor <cgf AT cygnus DOT com>
* features.h: Reinstate as wrapper for sys/features.h.
Index: thread.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/thread.cc,v
retrieving revision 1.26
diff -u -p -r1.26 thread.cc
--- thread.cc 2001/04/21 23:26:14 1.26
+++ thread.cc 2001/04/22 23:36:32
@@ -294,16 +294,16 @@ MTinterface::Init (int forked)
concurrency = 0;
threadcount = 1; /* 1 current thread when Init occurs.*/
+ mainthread.win32_obj_id = myself->hProcess;
+ mainthread.setThreadIdtoCurrent ();
+ /* store the main thread's self pointer */
+ TlsSetValue (thread_self_dwTlsIndex, &mainthread);
+
if (forked)
return;
/* possible the atfork lists should be inited here as well */
- mainthread.win32_obj_id = myself->hProcess;
- mainthread.setThreadIdtoCurrent ();
- /* store the main thread's self pointer */
- TlsSetValue (thread_self_dwTlsIndex, &mainthread);
-
for (int i =0;i<256;i++)pshared_mutexs[i]=NULL;
#if 0
> -----Original Message-----
> From: Christopher Faylor [mailto:cgf AT redhat DOT com]
> Sent: Monday, April 23, 2001 9:32 AM
> To: cygwin-developers AT cygwin DOT com
> Subject: Re: SHOWSTOPPER: [was Re: vfscanf in newlib]
>
>
> On Mon, Apr 23, 2001 at 09:10:04AM +1000, Robert Collins wrote:
> >> -----Original Message-----
> >> From: Christopher Faylor [mailto:cgf AT redhat DOT com]
> >> Sent: Monday, April 23, 2001 9:16 AM
> >> To: cygwin-developers AT cygwin DOT com
> >> Subject: Re: SHOWSTOPPER: [was Re: vfscanf in newlib]
> >>
> >>
> >> On Mon, Apr 23, 2001 at 08:59:47AM +1000, Robert Collins wrote:
> >> >I might be a cancellation point being checked before
> MTInterface is
> >> >initialised. If thats the case, I suggest that MTInterface is
> >> >initialised earlier.
> >>
> >> It should be initialized pretty early. I don't see any way
> >> for /etc/passwd
> >> to be read prior to this initialization.
> >>
> >> This is the initialization in question, right:
> >>
> >> user_data->threadinterface->Init (user_data->forkee);
> >>
> >
> >Yes.
> >
> >Actually can you tell me - the if (forked) below only runs in spawned
> >cygwin process's ? If so I've got a few bugs to fix..
>
> It only runs in non-forked processes.
>
> cgf
>
- Raw text -