{
int val;
#ifdef USABLE_SIGIO
- sigset_t blocked;
+ sigset_t oldset, blocked;
#endif
eassert (sd->fd >= 0);
#ifdef USABLE_SIGIO
sigemptyset (&blocked);
sigaddset (&blocked, SIGIO);
- pthread_sigmask (SIG_BLOCK, &blocked, 0);
+ pthread_sigmask (SIG_BLOCK, &blocked, &oldset);
#endif
val = sd->format;
turn_on_atimers (1);
#ifdef USABLE_SIGIO
- pthread_sigmask (SIG_UNBLOCK, &blocked, 0);
+ pthread_sigmask (SIG_SETMASK, &oldset, 0);
#endif
}
be interrupted by a signal. Block the ones we know to cause
troubles. */
#ifdef USABLE_SIGIO
- sigset_t blocked;
+ sigset_t blocked, oldset;
sigemptyset (&blocked);
sigaddset (&blocked, SIGIO);
- pthread_sigmask (SIG_BLOCK, &blocked, 0);
+ pthread_sigmask (SIG_BLOCK, &blocked, &oldset);
#endif
turn_on_atimers (0);
turn_on_atimers (1);
#ifdef USABLE_SIGIO
- pthread_sigmask (SIG_UNBLOCK, &blocked, 0);
+ pthread_sigmask (SIG_SETMASK, &oldset, 0);
#endif
/* Close the device. */
(Lisp_Object sound)
{
Lisp_Object attrs[SOUND_ATTR_SENTINEL];
- ptrdiff_t count = SPECPDL_INDEX ();
+ dynwind_begin ();
#ifndef WINDOWSNT
Lisp_Object file;
#endif /* WINDOWSNT */
- unbind_to (count, Qnil);
+ dynwind_end ();
return Qnil;
}
\f
void
syms_of_sound (void)
{
+#include "sound.x"
+
DEFSYM (QCdevice, ":device");
DEFSYM (QCvolume, ":volume");
DEFSYM (Qsound, "sound");
DEFSYM (Qplay_sound_functions, "play-sound-functions");
-
- defsubr (&Splay_sound_internal);
}
#endif /* HAVE_SOUND */