]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
- Use existing functions mtx_lock() and mtx_unlock().
authorpjd <pjd@FreeBSD.org>
Wed, 27 Sep 2006 08:39:00 +0000 (08:39 +0000)
committerpjd <pjd@FreeBSD.org>
Wed, 27 Sep 2006 08:39:00 +0000 (08:39 +0000)
commite2d5d5e15d3d708b2c2f19bf74208bbedef93d03
tree5da875b64050b3d3b2b1a7f7e210e51ccaa829be
parent88c514ae0ffa1dfb743b5626578c976dee659e20
- Use existing functions mtx_lock() and mtx_unlock().
- Change variable name to 'error', as this is what is mostly used for
  functions that return an error.
- Add mutex(9) to the SEE ALSO section.
- Bump the date.

I don't really like the example code. I'd prefer symmetry where possible, eg.

mtx_lock(&example_lock);
error = example(NULL, EXAMPLE_ONE);
mtx_unlock(&example_lock);
if (error != 0)
return (error);

But I'll leave it as it is for now.

Reviewed by: simon
share/examples/mdoc/example.9