tsleep()

tsleep()

概要

引数

実装

  824: void
  825: tsleep(Rendez *r, int (*fn)(void*), void *arg, ulong ms)
  826: {
  827:         if (up->tt){
  828:                 print("tsleep: timer active: mode %d, tf 0x%lux\n", up->tmode, up->tf);
  829:                 timerdel(up);
  830:         }
  831:         up->tns = MS2NS(ms);
  832:         up->tf = twakeup;
  833:         up->tmode = Trelative;
  834:         up->ta = up;
  835:         up->trend = r;
  836:         up->tfn = fn;
  837:         timeradd(up);
  838: 
  839:         if(waserror()){
  840:                 timerdel(up);
  841:                 nexterror();
  842:         }
  843:         sleep(r, tfn, arg);
  • 詳細はsleep()?を参照
  • 詳細はtfn()?を参照
  844:         if (up->tt)
  845:                 timerdel(up);
  846:         up->twhen = 0;
  847:         poperror();
  848: }