MPSolve
3.2.1
mt-types.h
Go to the documentation of this file.
1
/*
2
* This file is part of MPSolve 3.2.1
3
*
4
* Copyright (C) 2001-2020, Dipartimento di Matematica "L. Tonelli", Pisa.
5
* License: http://www.gnu.org/licenses/gpl.html GPL version 3 or higher
6
*
7
* Authors:
8
* Leonardo Robol <leonardo.robol@unipi.it>
9
*/
10
11
#include <pthread.h>
12
#include <
mps/mps.h
>
13
20
#ifndef MPS_MT_TYPES_
21
#define MPS_MT_TYPES_
22
23
#define MPS_LOCK(x) (pthread_mutex_lock (&(x).mutex))
24
25
#define MPS_UNLOCK(x) (pthread_mutex_unlock (&(x).mutex))
26
27
#define MPS_INIT_LOCK(x) (pthread_mutex_init (&(x).mutex, NULL))
28
35
struct
mps_boolean_mt
{
36
mps_boolean value;
37
pthread_mutex_t mutex;
38
};
39
46
struct
mps_long_int_mt
{
47
long
int
value;
48
pthread_mutex_t mutex;
49
};
50
51
#ifndef __cplusplus
52
typedef
struct
mps_boolean_mt
mps_boolean_mt
;
53
typedef
struct
mps_long_int_mt
mps_long_int_mt
;
54
55
#endif
56
#endif
mps.h
Header file for libmps.
mps_long_int_mt
A thread safe version of mps_boolean.
Definition:
mt-types.h:46
mps_boolean_mt
A thread safe version of mps_boolean.
Definition:
mt-types.h:35
include
mps
mt-types.h
Generated on Sat Aug 1 2020 00:00:00 for MPSolve by
1.8.18