
/* getpid() - Returns the BCPL address of the current task. (ryb)

   This will return a unique integer for each task.  It is intended
   for compatiblity with unix programs that use the returned value as
   a pseudo-random number (such as a the seed value for srand()).
*/

#include <exec/types.h>
#include <exec/tasks.h>
#include <functions.h>

int
getpid (void)
{
  return (int) ((ULONG) FindTask (0L) >> 2);
}
