~ubuntu-branches/ubuntu/wily/geotranz/wily

« back to all changes in this revision

Viewing changes to CCS/src/dtcc/CoordinateSystems/threads/threads.h

  • Committer: Bazaar Package Importer
  • Author(s): Roberto Lumbreras
  • Date: 2011-03-06 21:06:09 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110306210609-tsvzx88vdmpgc7u4
Tags: 3.1-1
* New upstream version.
* Added debian/make-orig-tar-bz2 to repackage the upstream .tgz easily.
* Dropped 005-openjdk-forms.patch, it didn't work well in all systems.
* Renamed libgeotranz3 to libgeotranz3.1 because of ABI changes.
* Added symbols64 file for alpha, s390 and 64bit architectures.
  (Closes: #609504)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// CLASSIFICATION: UNCLASSIFIED
2
 
 
3
 
#ifndef THREADS_H
4
 
  #define THREADS_H
5
 
 
6
 
/****************************************************************************/
7
 
/* RSC IDENTIFIER:  Threads
8
 
 *
9
 
 * ABSTRACT
10
 
 *
11
 
 *    The purpose of THREADS is to provide support for multithreading. 
12
 
 *    In order to lock a thread, a mutex can be created, locked and unlocked. 
13
 
 *
14
 
 * REUSE NOTES
15
 
 *
16
 
 *    Threads is intended for reuse by any application that requires multithreading
17
 
 *    support.
18
 
 *     
19
 
 *
20
 
 * LICENSES
21
 
 *
22
 
 *    None apply to this component.
23
 
 *
24
 
 * RESTRICTIONS
25
 
 *
26
 
 *    Threads has no restrictions.
27
 
 *
28
 
 * ENVIRONMENT
29
 
 *
30
 
 *    Threads was tested and certified in the following environments
31
 
 *
32
 
 *    1. Solaris 2.7
33
 
 *    2. Windows XP 
34
 
 *
35
 
 * MODIFICATIONS
36
 
 *
37
 
 *    Date              Description
38
 
 *    ----              -----------
39
 
 *    12-12-05          Original Code
40
 
 *
41
 
 */
42
 
 
43
 
#include "DtccApi.h"
44
 
 
45
 
/***************************************************************************/
46
 
/*
47
 
 *                               GLOBALS
48
 
 */
49
 
 
50
 
const long THREADS_NO_ERROR = 0x0000;
51
 
const long THREADS_CREATE_ERROR = 0x0001;
52
 
const long THREADS_LOCK_ERROR = 0x0002;
53
 
const long THREADS_UNLOCK_ERROR = 0x0004;
54
 
const long THREADS_DESTROY_ERROR = 0x0008;
55
 
 
56
 
 
57
 
/***************************************************************************/
58
 
/*
59
 
 *                          FUNCTION PROTOTYPES
60
 
 *                             for threads.cpp
61
 
 */
62
 
 
63
 
/* ensure proper linkage to c++ programs */
64
 
  #ifdef __cplusplus
65
 
extern "C" {
66
 
  #endif
67
 
 
68
 
#ifdef WIN32
69
 
#include <windows.h>
70
 
 
71
 
        typedef HANDLE Thread_Mutex;
72
 
 
73
 
  /* Create a mutex */
74
 
  long MSP_DTCC_API Threads_Create_Mutex(Thread_Mutex* thread_mutex);
75
 
 
76
 
 
77
 
  /* Lock the mutex */
78
 
  long MSP_DTCC_API Threads_Lock_Mutex(Thread_Mutex thread_mutex);
79
 
 
80
 
 
81
 
  /* Unlock the mutex */
82
 
  long MSP_DTCC_API Threads_Unlock_Mutex(Thread_Mutex thread_mutex);
83
 
 
84
 
 
85
 
  /* Destroy the mutex */
86
 
  long MSP_DTCC_API Threads_Destroy_Mutex(Thread_Mutex thread_mutex);
87
 
 
88
 
#else
89
 
#include <pthread.h>
90
 
 
91
 
        typedef pthread_mutex_t Thread_Mutex;
92
 
 
93
 
  /* Create a mutex */
94
 
  long Threads_Create_Mutex(Thread_Mutex* thread_mutex);
95
 
 
96
 
 
97
 
  /* Lock the mutex */
98
 
  long Threads_Lock_Mutex(Thread_Mutex thread_mutex);
99
 
 
100
 
 
101
 
  /* Unlock the mutex */
102
 
  long Threads_Unlock_Mutex(Thread_Mutex thread_mutex);
103
 
 
104
 
 
105
 
  /* Destroy the mutex */
106
 
  long Threads_Destroy_Mutex(Thread_Mutex thread_mutex);
107
 
 
108
 
#endif
109
 
 
110
 
 
111
 
 
112
 
 
113
 
 
114
 
  #ifdef __cplusplus
115
 
}
116
 
  #endif
117
 
 
118
 
#endif /* THREADS_H */
119
 
 
120
 
 
121
 
// CLASSIFICATION: UNCLASSIFIED