File:  [UNIX Amiga Emulator] / uae / src / md-i386-linux / exectasks.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:39:18 2018 UTC (8 years, 3 months ago) by root
Branches: MAIN, BSchmidt
CVS tags: uae068, HEAD
uae-0.6.8

 /*
  * UAE - The Un*x Amiga Emulator
  *
  * exec.library multitasking emulation
  *
  * Copyright 1996 Bernd Schmidt
  */


#include <setjmp.h>

#ifdef USE_EXECLIB

/* aaargh... doesn't work with glibc-2.0 */
struct switch_struct {
    jmp_buf j;
};

#define EXEC_SWITCH_TASKS(run, ready) do { \
    if (setjmp(run->sws.j) == 0) \
	longjmp(ready->sws.j, 1); \
} while(0)

#define EXEC_SETUP_SWS(t) do { \
    t->sws.j[0].__sp = nt->stack + 65536; \
    t->sws.j[0].__pc = &task_startup; \
} while(0)

#endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.