Feature: 1501518
[csql.git] / include / Process.h
blobf345f15e9d3f48259e150dda83589e852bf28c6a
1 /***************************************************************************
2 * Copyright (C) 2007 by www.databasecache.com *
3 * Contact: praba_tuty@databasecache.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 ***************************************************************************/
16 #ifndef PROCESS_H
17 #define PROCESS_H
19 #include<os.h>
20 #include<ErrorType.h>
22 class ProcInfo
24 public:
26 pid_t pid_;
28 int numThreads_;
32 class ThreadInfo
34 public:
36 pid_t pid_;
38 pthread_t thrid_;
40 void *want_; //single mutex which we are waiting for.
42 void *has_; //list of mutexes held
45 class Database;
47 class ProcessManager
49 public:
50 Database *systemDatabase;
51 ProcInfo *procInfo;
52 ThreadInfo *thrInfo;
53 ProcessManager(Database *sysdb) { systemDatabase = sysdb; procInfo = NULL; thrInfo = NULL; }
54 DbRetVal registerThread();
55 DbRetVal deregisterThread();
58 #endif