On Fri, 31 Oct 2008, Felix Schmidt wrote:

> There is an internal possibility to yield a thread
>
> the header pub_core_scheduler.h defines a function called
> VG_(vg_yield) but i do not find
> a possibility to include this function to my tool
>
> my approach to this problem is:
>
> 1) defining a wrapper function maybe in pub_tool_threadstate.h
> (VG_(yield_thread))
> 2) in coregrind/m_threadstate.h i will include pub_core_scheduler.h
> and implement the function defined in step one
> 3) the implementation of function (defined in 1) is simple, you have
> to call VG_(vg_yield)();
>
> what du you think about this approach?

For most modules there is a pub_core_*.h file and a pub_tool_*.h.  The 
latter contains tool-visible things.  Over time, lots of things have been 
moved from a pub_core_*.h file to a pub_tool_*.h file as they've proved 
useful to tools.

In this case, there currently is no pub_tool_scheduler.h.  Probably the best 
thing is to create one, and put VG_(vg_yield)() in it.

Nick

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to