[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
translator enhancement needed, correction
- To: <heh>
- Subject: translator enhancement needed, correction
- From: Mark S. Miller <mark>
- Date: Sat, 20 Jan 90 13:38:40 PST
- Cc: <michael>, <dean>, <xtech>
- In-reply-to: <Hugh>,12 PST <9001171847.AA22864@xanadu>
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