mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
use PTHREAD_PROCESS_SHARED instead of magic 1
This commit is contained in:
parent
1c76f32d19
commit
2638dc41d1
2 changed files with 3 additions and 3 deletions
|
@ -44,9 +44,9 @@ IPCChannelBuffer::IPCChannelBuffer()
|
||||||
goto error_condattr_init;
|
goto error_condattr_init;
|
||||||
if (pthread_mutexattr_init(&mutexattr) != 0)
|
if (pthread_mutexattr_init(&mutexattr) != 0)
|
||||||
goto error_mutexattr_init;
|
goto error_mutexattr_init;
|
||||||
if (pthread_condattr_setpshared(&condattr, 1) != 0)
|
if (pthread_condattr_setpshared(&condattr, PTHREAD_PROCESS_SHARED) != 0)
|
||||||
goto error_condattr_setpshared;
|
goto error_condattr_setpshared;
|
||||||
if (pthread_mutexattr_setpshared(&mutexattr, 1) != 0)
|
if (pthread_mutexattr_setpshared(&mutexattr, PTHREAD_PROCESS_SHARED) != 0)
|
||||||
goto error_mutexattr_setpshared;
|
goto error_mutexattr_setpshared;
|
||||||
if (pthread_cond_init(&cond, &condattr) != 0)
|
if (pthread_cond_init(&cond, &condattr) != 0)
|
||||||
goto error_cond_init;
|
goto error_cond_init;
|
||||||
|
|
|
@ -82,7 +82,7 @@ struct IPCChannelBuffer
|
||||||
u8 data[IPC_CHANNEL_MSG_SIZE] = {};
|
u8 data[IPC_CHANNEL_MSG_SIZE] = {};
|
||||||
|
|
||||||
IPCChannelBuffer();
|
IPCChannelBuffer();
|
||||||
~IPCChannelBuffer();
|
~IPCChannelBuffer(); // Note: only destruct once, i.e. in one process
|
||||||
};
|
};
|
||||||
|
|
||||||
struct IPCChannelShared
|
struct IPCChannelShared
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue