Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. void p_send(PP_IDENT ppid, void *pdata, usshort ldata)
  2. {
  3. char *p = (char *)pdata;
  4. while(ldata != 0)
  5. {
  6. if(_pipe[ppid].nocumul != dim_cond)
  7. {
  8. *_pipe[ppid].ps=*p;
  9. p++;
  10. if(_pipe[ppid].ps==&_pipe[ppid].conducta[dim_cond-1])
  11. _pipe[ppid].ps=_pipe[ppid].conducta;
  12. else
  13. {
  14. _pipe[ppid].ps++;
  15. ldata--;
  16. }
  17. }
  18. else
  19. {
  20. if(_pipe[ppid].rc!=0)
  21. {
  22. _wakeup(_pipe[ppid].itc;
  23. _pipe[ppid].rc=0;
  24. }
  25. _pipe[ppid].rs=ldata;
  26. _sleep(0);
  27.  
  28. }
  29. }
  30. if(_pipe[ppid].rc!=0)
  31. {
  32. _wakeup(_pipe[ppid].itc;
  33. _pipe[ppid].rc=0;
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement