Skip to content
Snippets Groups Projects
Commit ca1264dd authored by Jean-Damien Durand's avatar Jean-Damien Durand Committed by Steven Murray
Browse files

Document new Cglobals_get() prototype (return code has a meaning)

parent dd88297a
No related branches found
No related tags found
No related merge requests found
.\"
.\" $Id: Cglobals.man,v 1.1 2001/06/10 06:54:52 jdurand Exp $
.\" $Id: Cglobals.man,v 1.2 2001/06/12 07:49:53 jdurand Exp $
.\"
.TH CGLOBALS "3" "$Date: 2001/06/10 06:54:52 $" "CASTOR" "Common Library Functions"
.TH CGLOBALS "3" "$Date: 2001/06/12 07:49:53 $" "CASTOR" "Common Library Functions"
.SH NAME
\fBCglobals\fP \- \fBC\fPASTOR thread-safe \fBglobal\fP variable\fBs\fP interface
.SH SYNOPSIS
......@@ -17,7 +17,7 @@
.RE
.BI ");"
.P
.BI "void Cglobals_get(int *" key ", void **" addr ", size_t " size ");"
.BI "int Cglobals_get(int *" key ", void **" addr ", size_t " size ");"
.P
.BI "void Cglobals_getTid(int *" Tid ");"
.P
......@@ -123,6 +123,13 @@ bytes length speficied in your previous call to \fBCglobals_get\fP. Because of a
.I key
has then an importance, that's why it is necessary to always declare it with an initial value of -1.
.P
Return code is -1 on error, 0 on success and \fBnot\fP the first call for this
.I
key
, 1 on success and \fBit is\fP the first call for this
.I key.
This allows to distinguish when Cglobals_get() initialize the memory with zeros (return code 1) and not (return code 0).
.P
\fBCglobals_getTid\fP uses the third function address,
.I getTid
, given as an argument to \fBCglobals_init\fP, and will return in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment