[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

translator enhancement needed, correction



Date: Wed, 17 Jan 90 10:47:12 PST
   From: heh (Hugh Hoover)

   I like Michael's form even better.

     CRITICAL_BLOCK(aSema4, { critical block code});

   and MarkM, yes, I expect people to bite your head off for recommending
   a change... :-}

Sorry its taken so long to respond to this.  I like it too.  However,
it's not my department.  Mr. Hill, what do you think of adding to
sema4x.hxx:

#define CRITICAL_BLOCK(sema4Expr,block) {	\
    PLANT_BOMB(mutex,mutex);			\
    (sema4Expr)->p();				\
    ARM_BOMB(mutex,(sema4Expr));		\
    {block}
    }

and declaring MUTEX_BIGIN_WITH_EXPR, MUTEX_BEGIN, and MUTEX_END all to
be obsolete?  (we mean by "obsolete" what AT&T folk call "an
anachronism"--it continues to work, but is expected to be retired
eventually)

P.S.  The above code has not been tested, but *should* work (he said
sheepishly) as it is so similar to MUTEX_BEGIN_WITH_EXPR