IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 2, 2005, 9:40:50 AM (21 years ago)
Author:
eugene
Message:

psched bugfixes, moved IOBuffers and queues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.data/IOBufferOps.c

    r4693 r4697  
    1 # include "pclient.h"
     1# include "data.h"
    22
    33int InitIOBuffer (IOBuffer *buffer, int Nalloc) {
     
    6161}
    6262
     63/* read until buffer is empty (Nmax retries) */
     64int EmptyIOBuffer (IOBuffer *buffer, int Nmax, int fd) {
     65
     66  int i, status;
     67
     68  status = -1;
     69  for (i = 0; (status != 0) && (i < Nmax); i++) {
     70    status = ReadtoIOBuffer (buffer, fd);
     71    if (status == -1) usleep (10000);
     72    if (status > 0) i = 0;
     73  }
     74  if (status == -1) return (FALSE);
     75  return (TRUE);
     76}
     77
    6378void FreeIOBuffer (IOBuffer *buffer) {
    6479
Note: See TracChangeset for help on using the changeset viewer.