Mercurial > octave
annotate liboctave/util/oct-mutex.h @ 29358:0a5b15007766 stable
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2021.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 10 Feb 2021 09:52:15 -0500 |
parents | bd51beb6205e |
children | 7733ca1db419 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
29358
0a5b15007766
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
3 // Copyright (C) 2008-2021 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
7934 | 25 |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
26 #if ! defined (octave_oct_mutex_h) |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
27 #define octave_oct_mutex_h 1 |
7934 | 28 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
29 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
30 |
13985
43cc49c7abd1
Use thread-safe atomic reference counting (GCC and MSVC).
Michael Goffioul <michael.goffioul@gmail.com>
parents:
13281
diff
changeset
|
31 #include "oct-refcount.h" |
43cc49c7abd1
Use thread-safe atomic reference counting (GCC and MSVC).
Michael Goffioul <michael.goffioul@gmail.com>
parents:
13281
diff
changeset
|
32 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
33 namespace octave |
7952
2c0a0edae596
reorganize octave_mutex class
John W. Eaton <jwe@octave.org>
parents:
7943
diff
changeset
|
34 { |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
35 class mutex; |
7952
2c0a0edae596
reorganize octave_mutex class
John W. Eaton <jwe@octave.org>
parents:
7943
diff
changeset
|
36 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
37 class |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
38 base_mutex |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
39 { |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
40 public: |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
41 friend class mutex; |
7952
2c0a0edae596
reorganize octave_mutex class
John W. Eaton <jwe@octave.org>
parents:
7943
diff
changeset
|
42 |
27379
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
43 base_mutex (void) : m_count (1) { } |
13281
834f904a3dcb
Add support for full asynchronous graphics toolkit running in a separate
Michael Goffioul <michael.goffioul@gmail.com>
parents:
11523
diff
changeset
|
44 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
45 virtual ~base_mutex (void) = default; |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
46 |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
47 virtual void lock (void); |
7952
2c0a0edae596
reorganize octave_mutex class
John W. Eaton <jwe@octave.org>
parents:
7943
diff
changeset
|
48 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
49 virtual void unlock (void); |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
50 |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
51 virtual bool try_lock (void); |
7952
2c0a0edae596
reorganize octave_mutex class
John W. Eaton <jwe@octave.org>
parents:
7943
diff
changeset
|
52 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
53 private: |
27446
c23aee2104de
consistently use octave_idx_type for reference counts
John W. Eaton <jwe@octave.org>
parents:
27379
diff
changeset
|
54 refcount<octave_idx_type> m_count; |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
55 }; |
7934 | 56 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
57 class |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
58 OCTAVE_API |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
59 mutex |
7952
2c0a0edae596
reorganize octave_mutex class
John W. Eaton <jwe@octave.org>
parents:
7943
diff
changeset
|
60 { |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
61 public: |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
62 mutex (void); |
7952
2c0a0edae596
reorganize octave_mutex class
John W. Eaton <jwe@octave.org>
parents:
7943
diff
changeset
|
63 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
64 mutex (const mutex& m) |
27379
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
65 : m_rep (m.m_rep) |
25103
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
66 { |
27379
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
67 m_rep->m_count++; |
25103
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
68 } |
7934 | 69 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
70 ~mutex (void) |
25103
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
71 { |
27379
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
72 if (--m_rep->m_count == 0) |
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
73 delete m_rep; |
25103
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
74 } |
7934 | 75 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
76 mutex& operator = (const mutex& m) |
25103
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
77 { |
27379
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
78 if (m_rep != m.m_rep) |
25103
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
79 { |
27379
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
80 if (--m_rep->m_count == 0) |
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
81 delete m_rep; |
7934 | 82 |
27379
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
83 m_rep = m.m_rep; |
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
84 m_rep->m_count++; |
25103
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
85 } |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
86 |
25103
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
87 return *this; |
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
88 } |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
89 |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
90 void lock (void) |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
91 { |
27379
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
92 m_rep->lock (); |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
93 } |
7934 | 94 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
95 void unlock (void) |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
96 { |
27379
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
97 m_rep->unlock (); |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
98 } |
7934 | 99 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
100 bool try_lock (void) |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
101 { |
27379
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
102 return m_rep->try_lock (); |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
103 } |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
104 |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
105 protected: |
27379
3db033e86376
use m_ prefix for data members in most liboctave/util classes
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
106 base_mutex *m_rep; |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
107 }; |
22869
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
108 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
109 class |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
110 autolock |
7952
2c0a0edae596
reorganize octave_mutex class
John W. Eaton <jwe@octave.org>
parents:
7943
diff
changeset
|
111 { |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
112 public: |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
113 autolock (const mutex& m, bool block = true) |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
114 : m_mutex (m), m_lock_result (false) |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
115 { |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
116 if (block) |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
117 { |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
118 m_mutex.lock (); |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
119 m_lock_result = true; |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
120 } |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
121 else |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
122 m_lock_result = m_mutex.try_lock (); |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
123 } |
7934 | 124 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
125 // No copying. |
13281
834f904a3dcb
Add support for full asynchronous graphics toolkit running in a separate
Michael Goffioul <michael.goffioul@gmail.com>
parents:
11523
diff
changeset
|
126 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
127 autolock (const autolock&) = delete; |
13281
834f904a3dcb
Add support for full asynchronous graphics toolkit running in a separate
Michael Goffioul <michael.goffioul@gmail.com>
parents:
11523
diff
changeset
|
128 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
129 autolock& operator = (const autolock&) = delete; |
7936
78400fde223e
Support for backend-to-octave event management
John W. Eaton <jwe@octave.org>
parents:
7934
diff
changeset
|
130 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
131 ~autolock (void) |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
132 { |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
133 if (m_lock_result) |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
134 m_mutex.unlock (); |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
135 } |
13281
834f904a3dcb
Add support for full asynchronous graphics toolkit running in a separate
Michael Goffioul <michael.goffioul@gmail.com>
parents:
11523
diff
changeset
|
136 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
137 bool ok (void) const { return m_lock_result; } |
7934 | 138 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
139 operator bool (void) const { return ok (); } |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
140 |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
141 private: |
22865
89756f2f085b
use c++11 style for deleting default copy constructor and assignment operator
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
142 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
143 mutex m_mutex; |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
144 |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
145 bool m_lock_result; |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
146 }; |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
147 |
13281
834f904a3dcb
Add support for full asynchronous graphics toolkit running in a separate
Michael Goffioul <michael.goffioul@gmail.com>
parents:
11523
diff
changeset
|
148 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
149 class |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
150 OCTAVE_API |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
151 thread |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
152 { |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
153 public: |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
154 |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
155 static void init (void); |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
156 |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
157 static bool is_thread (void); |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
158 }; |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
159 } |
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
160 |
7934 | 161 #endif |