[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

2438.0. "DECmcc & DECthreads" by CCIIS1::ROGGEBAND () Thu Feb 27 1992 09:50

Hi all,

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. IfI 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 ?

Thanks,

Philippe.
    
T.RTitleUserPersonal
Name
DateLines
2438.1Is it *necessary* to map these identifiers?TOOK::BURGESSFri Mar 06 1992 13:0740
> 
> 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