home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / DLIBSSRC.ZIP / GETPID.C < prev    next >
Encoding:
C/C++ Source or Header  |  1987-06-14  |  241 b   |  13 lines

  1. extern char    *_base;
  2.  
  3. int getpid()
  4. /*
  5.  *    Return an integer value unique for this process.
  6.  */
  7. {
  8.     register unsigned long n;
  9.  
  10.     n = _base;            /* load process base address */
  11.     return(0x7FFF & (n>>8));    /* create unique pid from it */
  12. }
  13.