home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
mint
/
mntlib16.lzh
/
MNTLIB16
/
PAUSE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-03
|
698b
|
41 lines
/* public domain pause(), by ers */
#include <mintbind.h>
#include <signal.h>
#include <errno.h>
extern int __mint;
void
pause()
{
if (__mint)
(void)Pause();
/* do nothing for TOS */
}
/*
* Aargh! Can you say "race condition"? We definitely need a Psigpause()
* call in the MiNT kernel, but for now, we fake it...
*/
void
sigpause(mask)
long mask;
{
long oldmask;
if (__mint == 0) {
/* for TOS, we just toggle the signal mask -- maybe
* there's a pending signal that we can receive.
*/
oldmask = sigsetmask(mask);
sigsetmask(oldmask);
return;
}
oldmask = Psigsetmask(mask);
(void)Pause();
(void)Psigsetmask(oldmask);
}