X locking

Dennis Kaarsemaker dennis at kaarsemaker.net
Sun May 22 14:29:00 CDT 2005


On zo, 2005-05-22 at 21:46 +0300, Antti P Miettinen wrote:

> +#define _XCreateMutex(lock)			\
> +do {						\
> +    if (_XCreateMutex_fn)			\
> +        (*_XCreateMutex_fn)(lock);		\
> +    else					\
> +	memset(lock, 0, sizeof(*lock));		\
> +} while (0)

What's the point in the do{ .. }while(0)??
-- 
Dennis K.
 <- Are you suicidal?
 -> Only in the morning.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ubuntu.com/archives/ubuntu-devel/attachments/20050522/e6643033/attachment.pgp


More information about the ubuntu-devel mailing list