cvs commit: src/lib/libc/gen lockf.c src/lib/libc/sys fcntl.2 src/sys/compat/freebsd32 syscalls.master src/sys/compat/linux linux_file.c src/sys/compat/svr4 svr4_fcntl.c src/sys/conf NOTES files options ...

Doug Rabson dfr at
Thu Mar 27 01:41:35 PDT 2008

On 27 Mar 2008, at 03:56, Xin LI wrote:

> Great work!  I have not dig into the code yet but just curious -  
> will it be feasible to have the userland RPC client to share some  
> code to make it MTSAFE?

I took the userland RPC code as a starting point but I have not tried  
to keep them compatible. The main issue for an MTSAFE RPC client is  
dealing with replies. The existing locking in the userland RPC code  
copes with sending the request messages safely but would have problems  
handling the replies if two threads were trying to read from the socket.

It would be possible to take a similar approach to fixing this in  
userland. Basically you would build a list of pending requests and  
arrange for only one thread to read replies at any given time. That  
thread would examine each reply message and match it to a pending  
request by examining the XID field. The code is likely to be a bit  
different from the kernel version but the concept should be similar.

More information about the cvs-src mailing list