int verbose;
sigset_t mask;
int i;
+ struct timespec ts;
verbose = argc > 1;
setvbuf(stdout, NULL, _IONBF, 0);
// Wait until the signal has been delivered.
i = 0;
while (!sigioSeen) {
- if (sched_yield() < 0) {
- perror("sched_yield");
- }
+ ts.tv_sec = 0;
+ ts.tv_nsec = 1000000;
+ nanosleep(&ts, NULL);
i++;
if (i > 100000) {
fprintf(stderr, "looping too long waiting for signal\n");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <sched.h>
#include "libgo3.h"
int verbose;
struct sigaction sa;
int i;
+ struct timespec ts;
verbose = argc > 2;
setvbuf(stdout, NULL, _IONBF, 0);
// Wait until the signal has been delivered.
i = 0;
while (!sigioSeen) {
- if (sched_yield() < 0) {
- perror("sched_yield");
- }
+ ts.tv_sec = 0;
+ ts.tv_nsec = 1000000;
+ nanosleep(&ts, NULL);
i++;
if (i > 100000) {
fprintf(stderr, "looping too long waiting for signal\n");
// Wait until the signal has been delivered.
i = 0;
while (!sigioSeen) {
- if (sched_yield() < 0) {
- perror("sched_yield");
- }
+ ts.tv_sec = 0;
+ ts.tv_nsec = 1000000;
+ nanosleep(&ts, NULL);
i++;
if (i > 100000) {
fprintf(stderr, "looping too long waiting for signal\n");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <sched.h>
#include <pthread.h>
stack_t ss;
int i;
stack_t nss;
+ struct timespec ts;
// Set up an alternate signal stack for this thread.
memset(&ss, 0, sizeof ss);
// Wait until the signal has been delivered.
i = 0;
while (SIGIOCount() == 0) {
- if (sched_yield() < 0) {
- perror("sched_yield");
- }
+ ts.tv_sec = 0;
+ ts.tv_nsec = 1000000;
+ nanosleep(&ts, NULL);
i++;
if (i > 100000) {
fprintf(stderr, "looping too long waiting for signal\n");
int i;
int oldcount;
pthread_t tid;
+ struct timespec ts;
stack_t nss;
// Set up an alternate signal stack for this thread.
// Wait until the signal has been delivered.
i = 0;
while (SIGIOCount() == oldcount) {
- if (sched_yield() < 0) {
- perror("sched_yield");
- }
+ ts.tv_sec = 0;
+ ts.tv_nsec = 1000000;
+ nanosleep(&ts, NULL);
i++;
if (i > 100000) {
fprintf(stderr, "looping too long waiting for signal\n");
void (*fn)(void);
sigset_t mask;
int i;
+ struct timespec ts;
verbose = argc > 2;
setvbuf(stdout, NULL, _IONBF, 0);
// Wait until the signal has been delivered.
i = 0;
while (!sigioSeen) {
- if (sched_yield() < 0) {
- perror("sched_yield");
- }
+ ts.tv_sec = 0;
+ ts.tv_nsec = 1000000;
+ nanosleep(&ts, NULL);
i++;
if (i > 100000) {
fprintf(stderr, "looping too long waiting for signal\n");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <sched.h>
#include <dlfcn.h>
void (*fn1)(void);
int (*sawSIGIO)(void);
int i;
+ struct timespec ts;
verbose = argc > 2;
setvbuf(stdout, NULL, _IONBF, 0);
// Wait until the signal has been delivered.
i = 0;
while (!sigioSeen) {
- if (sched_yield() < 0) {
- perror("sched_yield");
- }
+ ts.tv_sec = 0;
+ ts.tv_nsec = 1000000;
+ nanosleep(&ts, NULL);
i++;
if (i > 100000) {
fprintf(stderr, "looping too long waiting for signal\n");
// Wait until the signal has been delivered.
i = 0;
while (!sigioSeen) {
- if (sched_yield() < 0) {
- perror("sched_yield");
- }
+ ts.tv_sec = 0;
+ ts.tv_nsec = 1000000;
+ nanosleep(&ts, NULL);
i++;
if (i > 100000) {
fprintf(stderr, "looping too long waiting for signal\n");