Date: Wed, 19 Jan 2000 11:57:45 -0500 (EST) From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: asami@cs.berkeley.edu (Satoshi Asami) Cc: current@FreeBSD.ORG Subject: sigisempty? Message-ID: <200001191657.LAA29895@khavrinen.lcs.mit.edu> In-Reply-To: <200001191503.HAA04869@silvia.hip.berkeley.edu> References: <200001191503.HAA04869@silvia.hip.berkeley.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Wed, 19 Jan 2000 07:03:04 -0800 (PST), asami@cs.berkeley.edu (Satoshi Asami) said: > How do I test if sigset_t is empty in -current? The xview sources > have this macro: > #define sigisempty(s) (!(*(s))) > which is ok for the old sigset_t (unsigned int) but obviously won't > work for the new one since it's a struct. int sigisempty(sigset_t *my_sigset) { static sigset_t empty_ss; static int emptied; if (!emptied) { sigemptyset(&empty_ss); emptied++; } return (memcmp(my_sigset, &empty_ss, sizeof empty_ss) == 0); } -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001191657.LAA29895>