akaros/scripts/spatch/rendez.cocci
<<
>>
Prefs
   1@@
   2expression RV;
   3expression RVF;
   4expression RVFA;
   5@@
   6-sleep(RV, RVF, RVFA);
   7+rendez_sleep(RV, RVF, RVFA);
   8
   9// i'm assuming this one runs first, matches all the return0s, which really
  10// just want to delay in place (I think).
  11@@
  12expression RV;
  13expression RVTO;
  14@@
  15-tsleep(RV, return0, 0, RVTO);
  16+kthread_usleep(RVTO * 1000);
  17
  18// and then this one catches all real usage of rendez_sleep_timeout
  19@@
  20expression RV;
  21expression RVF;
  22expression RVFA;
  23expression RVTO;
  24@@
  25-tsleep(RV, RVF, RVFA, RVTO);
  26+rendez_sleep_timeout(RV, RVF, RVFA, RVTO * 1000);
  27
  28@@
  29expression RV;
  30@@
  31-wakeup(RV);
  32+rendez_wakeup(RV);
  33