| >
> I have a question on the relationship between DECmcc & DEcthreads. In MCC,
> a thread is identified by a 32bit unsigned integer. In DECthreads, a thread
> is identified by an opaque structure called a handle.
Because one goal of v1.2 was preserve existing interfaces,
the framework maps 32-bit MCC thread-id to 64-bit CMA thread handles
thru an internal table. In addition, each mcc thread has
an associated data structure(thread-state-vector) which
keeps control and status information for managing the thread
and its resources with respect to the mcc framework model.
The argument was: If developers want a faster, simpler interface, then they
should use one of the DECthreads APIs. If they want upwards compatibility with MCC,
then MCC will try to provide it. (Of course the DECthreads
pre-emptive scheduler forced most code to be modified a bit anyway...)
> If I want to set up
> some form of inter-thread communication in DECmcc, I need the pointer to
> this handle. How does the DECmcc Thread Identifier map onto the DECthreads
> handle ? Is it a pointer to the handle ?
>
cma_thread_get_self() or pthread_self() will return the DECthreads handle value.
mcc_thread_get_self() returns the MCC thread identifier.
A thread can get both of its identifiers and provide them to the
universe...
The general identifier mappings from cma -> mcc and from mcc -> cma are private mechanisms
subject to change and require access to local data structures.
For what reason do you need to use the cma handle? This is the first request
that I have seen.
\Pete
|