File:  [GnuMach] / OSKit-Mach / oskit / osenv_sleep.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed Sep 2 04:55:50 2020 UTC (5 years, 10 months ago) by root
Branches: MAIN, GNU
CVS tags: HEAD, Final-Commit
GNU OSKit-Mach

#include <oskit/dev/dev.h>

#include "sched_prim.h"


void
osenv_sleep_init(osenv_sleeprec_t *sr)
{
  sr->data[0] = (void *) OSENV_SLEEP_WAKEUP;
}

int
osenv_sleep(osenv_sleeprec_t *sr)
{
  assert_wait (sr, FALSE);
  thread_block (0);
  return (int) sr->data[0];
}

void
osenv_wakeup(osenv_sleeprec_t *sr, int wakeup_status)
{
  sr->data[0] = (void *) wakeup_status;
  thread_wakeup (sr);
}

unix.superglobalmegacorp.com

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