diff options
author | midipix <writeonce@midipix.org> | 2017-08-04 22:22:22 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2017-08-04 17:33:16 -0400 |
commit | edb08567093daae164f6d3955884117dee74fe98 (patch) | |
tree | a0cbce284eccf262c4a2c65289b373658af59189 /src/sem | |
parent | 335494754eba35020cb2d4fd8c976fdb3a6e3507 (diff) | |
download | ntapi-edb08567093daae164f6d3955884117dee74fe98.tar.bz2 ntapi-edb08567093daae164f6d3955884117dee74fe98.tar.xz |
subsystem interfaces: added server-to-server synchronization interfaces.
Diffstat (limited to 'src/sem')
-rw-r--r-- | src/sem/ntapi_sem_connect.c | 30 | ||||
-rw-r--r-- | src/sem/ntapi_sem_fcntl.c | 3 |
2 files changed, 26 insertions, 7 deletions
diff --git a/src/sem/ntapi_sem_connect.c b/src/sem/ntapi_sem_connect.c index 32c3610..2dc9a94 100644 --- a/src/sem/ntapi_sem_connect.c +++ b/src/sem/ntapi_sem_connect.c @@ -259,12 +259,17 @@ int32_t __stdcall __ntapi_sem_open( __in uint32_t share, __in uint32_t nslots) { - int32_t status; - uint32_t key; - uint32_t id; - void * hsymlink; - nt_oa ipcoa; - void * hipc; + int32_t status; + uint32_t key; + uint32_t id; + void * hsymlink; + nt_oa ipcoa; + void * hipc; + nt_rtdata * rtdata; + nt_tty_service_info semctl; + + /* init */ + rtdata = (__ntapi_internals())->rtdata; /* validate */ if (!oa->root_dir) @@ -310,6 +315,19 @@ int32_t __stdcall __ntapi_sem_open( return status; } + /* semctl service attributes */ + if (!rtdata->hsempid) + if ((status = __semctl_get_service_attr(rtdata,&semctl))) + return status; + + /* semctl server */ + if ((status = __semctl_server_connect(rtdata,&semctl))) + return status; + + /* sempid symlink */ + if ((status = __sempid_symlink_set(rtdata,&semctl))) + return status; + /* ipc connect */ status = __ntapi->ipc_connect_by_symlink( &hipc,hsymlink); diff --git a/src/sem/ntapi_sem_fcntl.c b/src/sem/ntapi_sem_fcntl.c index d48557f..d160e66 100644 --- a/src/sem/ntapi_sem_fcntl.c +++ b/src/sem/ntapi_sem_fcntl.c @@ -37,5 +37,6 @@ int32_t __stdcall __ntapi_sem_fcntl( (void)output_buffer; (void)output_buffer_length; - return 0; + /* internal only */ + return NT_STATUS_NOT_IMPLEMENTED; } |