GSoC/GCI Archive
Google Code-in 2010 DragonFly BSD

doc: Write an EXAMPLES section for the ucontext(3)/makecontext(3)/getcontext(3)/setcontext(3) manpage(s)

completed by: Sanket Sali

mentors: Samuel J. Greear, Pratyush Kshirsagar

user thread contexts may be managed to manually control the flow control and execution of threads, it may be helpful to define within the manpage when and where one might want to use this functionality.

 

Write an EXAMPLES section for the ucontext(3)/makecontext(3)/getcontext(3)/setcontext(3) manpage(s) showing the usage of the functions defined in those manpage(s) in a plausible, real-world and if possible only semi-contrived scenario.

 

All examples should follow the style guidelines in the style(9) manpage.

All examples should be written in a manner that is self-documenting and make copious use of comments in order to explain the actions being taken.

Examples should be real and working code. They should not include headers or even a main function, but it should be reasonable for a developer to copy and paste an example from a manpage and expect it to work.

 

An example of a manpage with excellent example code is umtx(2).

 

Deliverables: A complete EXAMPLES manpage section in mdoc format.