BRL-CAD
process.c
Go to the documentation of this file.
1 /* P R O C E S S . C
2  * BRL-CAD
3  *
4  * Copyright (c) 2007-2014 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 
21 #include "common.h"
22 
23 /* system headers */
24 #include <sys/types.h>
25 #include "bio.h"
26 
27 /* common headers */
28 #include "bu/parallel.h"
29 
30 int
32 {
33 #ifdef HAVE_UNISTD_H
34  return getpid();
35 #else
36  return (int)GetCurrentProcessId();
37 #endif
38 }
39 
40 
41 /*
42  * Local Variables:
43  * tab-width: 8
44  * mode: C
45  * indent-tabs-mode: t
46  * c-file-style: "stroustrup"
47  * End:
48  * ex: shiftwidth=4 tabstop=8
49  */
int bu_process_id()
Definition: process.c:31
Header file for the BRL-CAD common definitions.