I fully agree with your remarks.

But if you want to make these functions more generic, it should be
possible to call sync_pipe_wait / notify several times, which is not
possible in the current code since I close file descriptors in these
functions.

A quite simple solution is to keep these file descriptors opened,
and to add a function to close them or simply let these file descriptors
being closed by libC or kernel at process end.

Regards.

R.

> Referring to the sync_pipes API,
>       create_sync_pipes(), wait_son_startup(), notify_startup()
>
> which is defined in the:
>       testcases/kernel/syscalls/lib/libtestsuite.[ch]
>
> I found the new sync_pipes API very convenient to synchronize processes.
>
> However the naming might pose some semantic restrictions on their usages.
> Since it can be used for making parent to wait child, and vice versa,
> perhaps a better naming should be used. For example:
>
>       sync_pipes_create (), sync_pipes_wait (), sync_pipes_notify()
>
> other names will be good as long as they don't assume the caller is child
> or parent.
>
> Furthermore, since it is also suitable for being used in common test cases,
> moving
> it outside the syscalls's directory to a more common place might be a good
> idea.
>
> Roy



-- 
Renaud Lottiaux

Kerlabs
Bâtiment Germanium
80, avenue des buttes de Coësmes
35700 Rennes - France
Phone : (+33|0)6 80 89 19 34
Fax   : (+33|0)2 99 84 71 71
Email : [EMAIL PROTECTED]
Web   : http://www.kerlabs.com/

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to