On Mon, Mar 30 22:11, Kevin Wolf wrote: > + kernel: SYSCALL_FASTRPC_WAIT als Kombination von RPC und wait_for_rpc() > * libc: Neuen Syscall fuer Sync-RPC benutzen > --- > src/include/syscallno.h | 1 + > src/kernel/src/syscall.c | 10 ++++++++++ > src/modules/include/syscall.h | 1 + > src/modules/lib/rpc/sync.c | 2 +- > src/modules/lib/syscalls/rpc.c | 21 +++++++++++++++++---- > 5 files changed, 30 insertions(+), 5 deletions(-) > > diff --git a/src/modules/lib/syscalls/rpc.c b/src/modules/lib/syscalls/rpc.c > index 72d4bbc..68cb394 100644 > --- a/src/modules/lib/syscalls/rpc.c > +++ b/src/modules/lib/syscalls/rpc.c > @@ -16,8 +16,9 @@ void rpc(dword pid) > } while (result != 0); > } > > -void send_message > - (dword pid, dword function, dword correlation_id, dword len, char* data) > +static inline void do_send_message > + (dword pid, dword function, dword correlation_id, dword len, char* data, > + bool wait_for_rpc) > { > dword result = 0; > > @@ -38,10 +39,22 @@ void send_message > "mov %1, %%eax;" > "int $0x30;" > "add $0x14, %%esp;" > - : "=a" (result) > - : "i" (SYSCALL_FASTRPC), "g" (pid), "i" (0x8), "g" (metadata), > + : "=a" (result) > + : "i" (wait_for_rpc ? SYSCALL_FASTRPC_WAIT : SYSCALL_FASTRPC), > + "g" (pid), "i" (0x8), "g" (metadata), > "g" (len), "g" (data), "0" (result)); > > } while (result != 0); > } Hm wenn ich das mit -O0 kompilieren möchte sagt mir der gcc Folgendes: rpc.c: In function 'do_send_message': rpc.c:33: warning: asm operand 1 probably doesn't match constraints rpc.c:33: error: impossible constraint in 'asm' > > +void send_message > + (dword pid, dword function, dword correlation_id, dword len, char* data) > +{ > + do_send_message(pid, function, correlation_id, len, data, FALSE); > +} > + > +void send_message_and_wait_for_rpc > + (dword pid, dword function, dword correlation_id, dword len, char* data) > +{ > + do_send_message(pid, function, correlation_id, len, data, TRUE); > +} > -- > 1.5.6.5 > > _______________________________________________ > tyndur-devel mailing list > tyndur-devel@xxxxxxxxxx > http://list.tyndur.org/mailman/listinfo/tyndur-devel -- Antoine Kaufmann <toni@xxxxxxxxxxxxxxxx>
Attachment:
pgp3V7AOFnePC.pgp
Description: PGP signature