diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-10-12 02:15:39 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-10-14 13:19:10 +0200 |
commit | bedd1d4eadde9ab64f924c69eba716b015599e67 (patch) | |
tree | b521ef89c8752334448bee1582b51dbe97851839 /doc/man/ouroboros_init.3 | |
parent | a483bc8597e5c19e796dc55c0587f1a045bc7281 (diff) | |
download | ouroboros-bedd1d4eadde9ab64f924c69eba716b015599e67.tar.gz ouroboros-bedd1d4eadde9ab64f924c69eba716b015599e67.zip |
lib: Deprecate ouroboros_init and ourboros_fini
This commit deprecates ouroboros_init and ouroboros_fini and adds them
as a constructor or destructor, causing these function to be run
automatically when a program that links to the library calls and exits
main(). For this to fully work, the library had to be split so that we
can avoid the irmd calling these functions (the IRMd has to create the
shm structures on which these calls depend).
The library is split in 3 parts: libouroboros-dev, libouroboros-irm
and libouroboros-common. The latter is linked to the other two so that
including libouroboros-dev or libouroboros-irm will also link
libouroboros-common.
Diffstat (limited to 'doc/man/ouroboros_init.3')
-rw-r--r-- | doc/man/ouroboros_init.3 | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/doc/man/ouroboros_init.3 b/doc/man/ouroboros_init.3 deleted file mode 100644 index c74bea5e..00000000 --- a/doc/man/ouroboros_init.3 +++ /dev/null @@ -1,69 +0,0 @@ -.\" Ouroboros man pages (C) 2017 -.\" Dimitri Staessens <dimitri.staessens@ugent.be> -.\" Sander Vrijders <sander.vrijders@ugent.be> - -.TH OUROBOROS_INIT 3 2017-04-10 GNU "Ouroboros Programmer's Manual" - -.SH NAME - -ouroboros_init, ouroboros_fini \- initialize and finalize an -application for using Ouroboros - -.SH SYNOPSIS - -.B #include <ouroboros/dev.h> - -\fBint ouroboros_init(char * \fIapn\fB);\fR - -\fBvoid ouroboros_fini(void);\fR - -Compile and link with \fI-louroboros\fR. - -.SH DESCRIPTION - -The \fBouroboros_init\fR() call initializes an application process -instance for using the Ouroboros IPC infrastructure. If the -application is a server or peer, a \fBchar * \fIapn\fR has to be -provided indicating the application process that this instance belongs -to. This is usually argv[0]. A client application may pass NULL. The -\fBouroboros_fini\fR() call will release all resources allocated by -\fBouroboros_fini\fR(). - -\fBouroboros_init\fR() and \fBouroboros_fini\fR() should be called -only once in the application. - -.SH RETURN VALUE - -On success, \fBouroboros_init\fR() returns 0. On failure, a negative -value indicating the error will be returned. The -\fBouroboros_fini\fR() function has no return value. - -.SH ERRORS - -\fBouroboros_init\fR() can return the following errors: - -.B -EIRMD -Failed to contact an IRMd instance. - -.B -ENOMEM -Insufficient system resources to intialize the application. - -.SH ATTRIBUTES - -For an explanation of the terms used in this section, see -\fBattributes\fR(7). - -.TS -box, tab(&); -LB|LB|LB -L|L|L. -Interface & Attribute & Value -_ -\fBouroboros_init\fR() & Thread safety & MT-Safe -_ -\fBouroboros_fini\fR() & Thread safety & MT-Safe -.TE - -.SH COLOPHON -This page is part of the Ouroboros project, found at -https://bitbucket.org/ouroboros-rina/ouroboros |