Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 May 1997 22:41:25 -0500 (CDT)
From:      "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
To:        hackers@FreeBSD.ORG, terry@lambert.org
Subject:   Re: GNAT-pthreads integration bugs/questions
Message-ID:  <199705190341.WAA26464@iworks.InterWorks.org>

next in thread | raw e-mail | index | archive | help

> [ ... synchronization primitives ... ]
>
  
> > I need to be able to bind a structure (pointer) to a process ID.  I
> > could maintain a list of process ID/structure pointer pairs and then
> > search through the list based on process ID.  The pthread_getspecific()
> > and pthread_setspecific do this based on the thread ID.  The taskVarAdd()
> > in VxWorks is even nicer because it automatically swaps the task
> > variable for you whenever tasks are swapped - no need to call a get.
>
> Well, the heap is shared in the RFMEM case.  I don't see why you could
> not implement it using a global counter, provided it only ever gets
> called once per process.
>
> You could use the counter value locally to index an array of these
> structs in the heap.

Maybe I'm missing something here ;-)  In the GNAT runtime, I need to
be able to retrieve a pointer to a structure (Ada Task Control Block)
based soley on the PID (assuming we're using rfork).  The PID is all
we know, and we must be able to find the ATCB for this process.  The
structures can be in shared data, but I still have to perform some
sort of lookup/search to find the ATCB for a process ID.

Dan Eischen
deischen@iworks.InterWorks.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705190341.WAA26464>