2002-09-04 Bruno Haible <bruno@clisp.org>

* sysdeps/unix/sysv/linux/sigset-cvt-mask.h (sigset_set_old_mask,
	sigset_get_old_mask): Turn into inline functions.
	* sysdeps/unix/sysv/aix/sigset-cvt-mask.h (sigset_set_old_mask,
	sigset_get_old_mask): Likewise.
	* sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h (sigset_set_old_mask,
	sigset_get_old_mask): Likewise.
This commit is contained in:
Roland McGrath 2002-09-05 18:51:44 +00:00
parent 0d272f7da5
commit e699500013
2 changed files with 27 additions and 15 deletions

View File

@ -18,8 +18,16 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#define sigset_set_old_mask(set, mask) \
((set)->__losigs = (unsigned int) (mask), (set)->__hisigs = 0, 0)
static inline int __attribute__ ((unused))
sigset_set_old_mask (sigset_t *set, int mask)
{
set->__losigs = (unsigned int) mask;
set->__hisigs = 0;
return 0;
}
#define sigset_get_old_mask(set, mask) \
((unsigned int) (set)->__losigs)
static inline int __attribute__ ((unused))
sigset_get_old_mask (const sigset_t *set)
{
return (unsigned int) set->__losigs;
}

View File

@ -19,15 +19,19 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#define sigset_set_old_mask(set, mask) \
({ \
unsigned long int *__ptr; \
__ptr = &(set)->__sigbits[0]; \
__ptr[0] = (mask); \
__ptr[1] = 0ul; \
__ptr[2] = 0ul; \
__ptr[3] = 0ul; \
0; })
static inline int __attribute__ ((unused))
sigset_set_old_mask (sigset_t *set, int mask)
{
set->__sigbits[0] = (unsigned int) mask;
set->__sigbits[1] = 0ul;
set->__sigbits[2] = 0ul;
set->__sigbits[3] = 0ul;
#define sigset_get_old_mask(set) \
((unsigned int) (set)->__sigbits[0])
return 0;
}
static inline int __attribute__ ((unused))
sigset_get_old_mask (const sigset_t *set)
{
return (unsigned int) set->__sigbits[0];
}