diff options
Diffstat (limited to 'usr/src/man/man3c')
-rw-r--r-- | usr/src/man/man3c/dldump.3c | 10 | ||||
-rw-r--r-- | usr/src/man/man3c/dlopen.3c | 12 | ||||
-rw-r--r-- | usr/src/man/man3c/mutex_init.3c | 18 |
3 files changed, 7 insertions, 33 deletions
diff --git a/usr/src/man/man3c/dldump.3c b/usr/src/man/man3c/dldump.3c index 8f8860345e..504fe7b71b 100644 --- a/usr/src/man/man3c/dldump.3c +++ b/usr/src/man/man3c/dldump.3c @@ -3,7 +3,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DLDUMP 3C "Mar 1, 2004" +.TH DLDUMP 3C "Sep 7, 2015" .SH NAME dldump \- create a new file from a dynamic object component of the calling process @@ -12,11 +12,10 @@ process .nf #include <dlfcn.h> -\fBint\fR \fBdldump\fR(\fBconst char *\fR \fIipath\fR, \fBconst char *\fR \fIopath\fR, \fBint\fR \fIflags\fR); +\fBint\fR \fBdldump\fR(\fBconst char *\fR\fIipath\fR, \fBconst char *\fR\fIopath\fR, \fBint\fR \fIflags\fR); .fi .SH DESCRIPTION -.sp .LP The \fBdldump()\fR function creates a new dynamic object \fIopath\fR from an existing dynamic object \fIipath\fR that is bound to the current process. An @@ -223,7 +222,6 @@ for example, will not start where the original executable called \fBdldump()\fR. It will gain control at the executable's normal entry point. See \fBEXAMPLES\fR. .SH RETURN VALUES -.sp .LP On successful creation of the new object, \fBdldump()\fR returns \fB0\fR. Otherwise, a non-zero value is returned and more detailed diagnostic @@ -395,13 +393,11 @@ this may invalidate the calling image; thus, following the call to \fBdldump()\fR, only a call to \fB_Exit\fR(2) should be made. .SH USAGE -.sp .LP The \fBdldump()\fR function is one of a family of functions that give the user direct access to the dynamic linking facilities. These facilities are available to dynamically-linked processes only. See \fILinker and Libraries Guide\fR). .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -417,7 +413,6 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .LP \fBld\fR(1), \fBld.so.1\fR(1), \fBstrip\fR(1), \fB_Exit\fR(2), \fBbrk\fR(2), \fBexec\fR(2), \fB_exithandle\fR(3C), \fBdladdr\fR(3C), \fBdlclose\fR(3C), @@ -427,7 +422,6 @@ MT-Level MT-Safe .LP \fILinker and Libraries Guide\fR .SH NOTES -.sp .LP These functions are available to dynamically-linked processes only. .sp diff --git a/usr/src/man/man3c/dlopen.3c b/usr/src/man/man3c/dlopen.3c index 6555f23003..b72d070579 100644 --- a/usr/src/man/man3c/dlopen.3c +++ b/usr/src/man/man3c/dlopen.3c @@ -3,7 +3,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DLOPEN 3C "Feb 4, 2005" +.TH DLOPEN 3C "Sep 7, 2015" .SH NAME dlopen, dlmopen \- gain access to an executable object file .SH SYNOPSIS @@ -12,16 +12,15 @@ dlopen, dlmopen \- gain access to an executable object file #include <dlfcn.h> #include <link.h> -\fBvoid *\fR \fBdlopen\fR(\fBconst char *\fR\fIpathname\fR, \fBint\fR \fImode\fR); +\fBvoid *\fR\fBdlopen\fR(\fBconst char *\fR\fIpathname\fR, \fBint\fR \fImode\fR); .fi .LP .nf -\fBvoid *\fR \fBdlmopen\fR(\fBLmid_t\fR \fIlmid\fR, \fBconst char *\fR\fIpathname\fR, \fBint\fR \fImode\fR); +\fBvoid *\fR\fBdlmopen\fR(\fBLmid_t\fR \fIlmid\fR, \fBconst char *\fR\fIpathname\fR, \fBint\fR \fImode\fR); .fi .SH DESCRIPTION -.sp .LP The \fBdlopen()\fR function makes an executable object file available to a running process. \fBdlopen()\fR returns to the process a \fIhandle\fR that the @@ -274,7 +273,6 @@ are opened on a new link-map list must express all of their dependencies. .RE .SH RETURN VALUES -.sp .LP The \fBdlopen()\fR function returns \fINULL\fR if \fIpathname\fR cannot be found, cannot be opened for reading, or is not a shared object or a relocatable @@ -283,14 +281,12 @@ process of loading \fIpathname\fR or relocating its symbolic references. See \fBNOTES\fR. Additional diagnostic information is available through \fBdlerror()\fR. .SH USAGE -.sp .LP The \fBdlopen()\fR and \fBdlmopen()\fR functions are members of a family of functions that give the user direct access to the dynamic linking facilities. This family of functions is available only to dynamically-linked processes. See the \fILinker and Libraries Guide\fR. .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -308,7 +304,6 @@ MT\(miLevel MT\(miSafe .TE .SH SEE ALSO -.sp .LP \fBld\fR(1), \fBld.so.1\fR(1), \fBdladdr\fR(3C), \fBdlclose\fR(3C), \fBdldump\fR(3C), \fBdlerror\fR(3C), \fBdlinfo\fR(3C), \fBdlsym\fR(3C), @@ -317,7 +312,6 @@ MT\(miLevel MT\(miSafe .LP \fILinker and Libraries Guide\fR .SH NOTES -.sp .LP If \fIpathname\fR has dependencies on other objects, these objects are automatically loaded by \fBdlopen()\fR. The directory search path used to find diff --git a/usr/src/man/man3c/mutex_init.3c b/usr/src/man/man3c/mutex_init.3c index 3a42aee0ec..a9b75a4155 100644 --- a/usr/src/man/man3c/mutex_init.3c +++ b/usr/src/man/man3c/mutex_init.3c @@ -10,7 +10,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH MUTEX_INIT 3C "Oct 22, 2014" +.TH MUTEX_INIT 3C "Sep 7, 2015" .SH NAME mutex_init, mutex_lock, mutex_trylock, mutex_unlock, mutex_consistent, mutex_destroy \- mutual exclusion locks @@ -21,7 +21,7 @@ cc -mt [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ] #include <thread.h> #include <synch.h> -\fBint\fR \fBmutex_init\fR(\fBmutex_t *\fR\fImp\fR, \fBint\fR \fItype\fR, \fBvoid *\fR \fIarg\fR); +\fBint\fR \fBmutex_init\fR(\fBmutex_t *\fR\fImp\fR, \fBint\fR \fItype\fR, \fBvoid *\fR\fIarg\fR); .fi .LP @@ -50,7 +50,6 @@ cc -mt [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ] .fi .SH DESCRIPTION -.sp .LP Mutual exclusion locks (mutexes) prevent multiple threads from simultaneously executing critical sections of code that access shared data (that is, mutexes @@ -66,7 +65,6 @@ Mutexes can be used to synchronize threads between processes if the mutexes are allocated in writable memory and shared among the cooperating processes (see \fBmmap\fR(2)), and have been initialized for this task. .SS "Initialize" -.sp .LP Mutexes are either intra-process or inter-process, depending upon the argument passed implicitly or explicitly to the initialization of that mutex. A @@ -325,7 +323,6 @@ Same as (\fBUSYNC_THREAD\fR | \fBLOCK_RECURSIVE\fR | \fBLOCK_ERRORCHECK\fR) .RE .SS "Lock and Unlock" -.sp .LP A critical section of code is enclosed by a the call to lock the mutex and the call to unlock the mutex to protect it from simultaneous access by multiple @@ -371,18 +368,15 @@ policy will determine which thread gets the mutex. If the calling thread is not the owner of the lock, no error status is returned, and the behavior of the program is undefined. .SS "Destroy" -.sp .LP The \fBmutex_destroy()\fR function destroys the mutex object referenced by \fImp\fR. The mutex object becomes uninitialized. The space used by the destroyed mutex variable is not freed. It needs to be explicitly reclaimed. .SH RETURN VALUES -.sp .LP If successful, these functions return \fB0\fR. Otherwise, an error number is returned. .SH ERRORS -.sp .LP The \fBmutex_init()\fR function will fail if: .sp @@ -535,7 +529,6 @@ having an inconsistent state (\fBEOWNERDEAD\fR). .SH EXAMPLES .SS "Single Gate" -.sp .LP The following example uses one global mutex as a gate-keeper to permit each thread exclusive sequential access to the code within the user-defined @@ -572,7 +565,6 @@ void * change_global_data(void *null){ .in -2 .SS "Multiple Instruction Single Data" -.sp .LP The previous example, the mutex, the code it owns, and the data it protects was enclosed in one function. The next example uses C++ features to accommodate @@ -638,7 +630,6 @@ void * change_global_data(void *) { .in -2 .SS "Interprocess Locking" -.sp .LP A mutex can protect data that is shared among processes. The mutex would need to be initialized as \fBUSYNC_PROCESS\fR. One process initializes the @@ -751,7 +742,6 @@ void test_argv(char argv1[]) { .in -2 .SS "Solaris Interprocess Robust Locking" -.sp .LP A mutex can protect data that is shared among processes robustly. The mutex would need to be initialized as \fBUSYNC_PROCESS\fR | \fBLOCK_ROBUST\fR. One @@ -854,7 +844,6 @@ void create_shared_memory() { .in -2 .SS "Dynamically Allocated Mutexes" -.sp .LP The following example allocates and frees memory in which a mutex is embedded. .sp @@ -913,7 +902,6 @@ free(r); /* then free memory */ .LP If the mutex is not destroyed, the program could have memory leaks. .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -931,7 +919,6 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .LP \fBmmap\fR(2), \fBshmop\fR(2), \fBpthread_mutexattr_getprioceiling\fR(3C), \fBpthread_mutexattr_getprotocol\fR(3C), \fBpthread_mutexattr_getrobust\fR(3C), @@ -939,7 +926,6 @@ MT-Level MT-Safe \fBpthread_mutex_init\fR(3C), \fBattributes\fR(5), \fBmutex\fR(5), \fBstandards\fR(5) .SH NOTES -.sp .LP Previous releases of Solaris provided the \fBUSYNC_PROCESS_ROBUST\fR mutex type. This type is now deprecated but is still supported for source and binary |