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:
230 bytes
|
Rev | Line | |
---|
[398] | 1 | #include "pthread_impl.h"
|
---|
| 2 |
|
---|
| 3 | void __lock(volatile int *l)
|
---|
| 4 | {
|
---|
| 5 | if (libc.threads_minus_1)
|
---|
| 6 | while (a_swap(l, 1)) __wait(l, l+1, 1, 1);
|
---|
| 7 | }
|
---|
| 8 |
|
---|
| 9 | void __unlock(volatile int *l)
|
---|
| 10 | {
|
---|
| 11 | if (l[0]) {
|
---|
| 12 | a_store(l, 0);
|
---|
| 13 | if (l[1]) __wake(l, 1, 1);
|
---|
| 14 | }
|
---|
| 15 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.