/* profil.c (emx+gcc) -- Copyright (c) 1995-1996 by Eberhard Mattes */

#include <stddef.h>
#include <stdlib.h>
#include <errno.h>
#include <emx/syscalls.h>

int _profil (void *buff, unsigned bufsiz, unsigned offset, unsigned scale)
{
  struct _profil data;

  if (_osmode == OS2_MODE && *_threadid != 1)
    {
      errno = EINVAL;
      return -1;
    }
  data.cb = sizeof (data);
  data.buff = buff;
  data.bufsiz = bufsiz;
  data.offset = offset;
  data.scale = scale;
  return __profil (&data);
}
