Back to index

glibc  2.9
iofread.c File Reference
#include "libioP.h"

Go to the source code of this file.


_IO_size_t _IO_fread (void *buf, _IO_size_t size, _IO_size_t count, _IO_FILE *fp)

Function Documentation

_IO_size_t _IO_fread ( void *  buf,
_IO_size_t  size,
_IO_size_t  count,
_IO_FILE fp 

Definition at line 32 of file iofread.c.

  _IO_size_t bytes_requested = size * count;
  _IO_size_t bytes_read;
  CHECK_FILE (fp, 0);
  if (bytes_requested == 0)
    return 0;
  _IO_acquire_lock (fp);
  bytes_read = INTUSE(_IO_sgetn) (fp, (char *) buf, bytes_requested);
  _IO_release_lock (fp);
  return bytes_requested == bytes_read ? count : bytes_read / size;

Here is the call graph for this function: