Last change
on this file since 413 was 398, checked in by coas-nagasima, 5 years ago |
mbedTLS版Azure IoT Hub接続サンプルのソースコードを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
252 bytes
|
Rev | Line | |
---|
[398] | 1 | #include <pthread.h>
|
---|
| 2 |
|
---|
| 3 | static pthread_rwlock_t lock = PTHREAD_RWLOCK_INITIALIZER;
|
---|
| 4 |
|
---|
| 5 | void __inhibit_ptc()
|
---|
| 6 | {
|
---|
| 7 | pthread_rwlock_wrlock(&lock);
|
---|
| 8 | }
|
---|
| 9 |
|
---|
| 10 | void __acquire_ptc()
|
---|
| 11 | {
|
---|
| 12 | pthread_rwlock_rdlock(&lock);
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | void __release_ptc()
|
---|
| 16 | {
|
---|
| 17 | pthread_rwlock_unlock(&lock);
|
---|
| 18 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.