mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 20:30:28 +02:00
(scm_make_arbiter, scm_try_arbiter)
(scm_release_arbiter): Added texinfo markup to docstrings. Changed `Returns' to `Return'. (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
This commit is contained in:
parent
e1546b65f8
commit
cb87e06ae6
1 changed files with 14 additions and 11 deletions
|
@ -73,15 +73,16 @@ arbiter_print (SCM exp, SCM port, scm_print_state *pstate)
|
||||||
scm_puts ("#<arbiter ", port);
|
scm_puts ("#<arbiter ", port);
|
||||||
if (SCM_ARB_LOCKED (exp))
|
if (SCM_ARB_LOCKED (exp))
|
||||||
scm_puts ("locked ", port);
|
scm_puts ("locked ", port);
|
||||||
scm_iprin1 (SCM_CDR (exp), port, pstate);
|
scm_iprin1 (SCM_PACK (SCM_SMOB_DATA (exp)), port, pstate);
|
||||||
scm_putc ('>', port);
|
scm_putc ('>', port);
|
||||||
return !0;
|
return !0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SCM_DEFINE (scm_make_arbiter, "make-arbiter", 1, 0, 0,
|
SCM_DEFINE (scm_make_arbiter, "make-arbiter", 1, 0, 0,
|
||||||
(SCM name),
|
(SCM name),
|
||||||
"Returns an object of type arbiter and name name. Its state is initially unlocked.\n"
|
"Return an object of type arbiter and name @var{name}. Its\n"
|
||||||
"Arbiters are a way to achieve process synchronization.")
|
"state is initially unlocked. Arbiters are a way to achieve\n"
|
||||||
|
"process synchronization.")
|
||||||
#define FUNC_NAME s_scm_make_arbiter
|
#define FUNC_NAME s_scm_make_arbiter
|
||||||
{
|
{
|
||||||
SCM_RETURN_NEWSMOB (scm_tc16_arbiter, SCM_UNPACK (name));
|
SCM_RETURN_NEWSMOB (scm_tc16_arbiter, SCM_UNPACK (name));
|
||||||
|
@ -90,7 +91,8 @@ SCM_DEFINE (scm_make_arbiter, "make-arbiter", 1, 0, 0,
|
||||||
|
|
||||||
SCM_DEFINE (scm_try_arbiter, "try-arbiter", 1, 0, 0,
|
SCM_DEFINE (scm_try_arbiter, "try-arbiter", 1, 0, 0,
|
||||||
(SCM arb),
|
(SCM arb),
|
||||||
"Returns #t and locks arbiter if arbiter was unlocked. Otherwise, returns #f.")
|
"Return @code{#t} and lock the arbiter @var{arb} if the arbiter\n"
|
||||||
|
"was unlocked. Otherwise, return @code{#f}.")
|
||||||
#define FUNC_NAME s_scm_try_arbiter
|
#define FUNC_NAME s_scm_try_arbiter
|
||||||
{
|
{
|
||||||
SCM_VALIDATE_SMOB (1, arb, arbiter);
|
SCM_VALIDATE_SMOB (1, arb, arbiter);
|
||||||
|
@ -110,7 +112,8 @@ SCM_DEFINE (scm_try_arbiter, "try-arbiter", 1, 0, 0,
|
||||||
|
|
||||||
SCM_DEFINE (scm_release_arbiter, "release-arbiter", 1, 0, 0,
|
SCM_DEFINE (scm_release_arbiter, "release-arbiter", 1, 0, 0,
|
||||||
(SCM arb),
|
(SCM arb),
|
||||||
"Returns #t and unlocks arbiter if arbiter was locked. Otherwise, returns #f.")
|
"Return @code{#t} and unlock the arbiter @var{arb} if the\n"
|
||||||
|
"arbiter was locked. Otherwise, return @code{#f}.")
|
||||||
#define FUNC_NAME s_scm_release_arbiter
|
#define FUNC_NAME s_scm_release_arbiter
|
||||||
{
|
{
|
||||||
SCM_VALIDATE_SMOB (1, arb, arbiter);
|
SCM_VALIDATE_SMOB (1, arb, arbiter);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue