File: gettid.c

package info (click to toggle)
binkd 1.1a-111-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,500 kB
  • sloc: ansic: 22,959; makefile: 1,113; perl: 369; sh: 325
file content (18 lines) | stat: -rw-r--r-- 239 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifdef __WATCOMC__
  #define __IBMC__ 0
  #define __IBMCPP__ 0
#endif

#define INCL_DOS
#include <os2.h>

int gettid(void)
{ 
  PTIB ptib;
  PPIB ppib;
 
  DosGetInfoBlocks(&ptib, &ppib);
 
  return (int) (ptib->tib_ptib2->tib2_ultid);
}