summaryrefslogtreecommitdiffstats
path: root/nsprpub/pr/src/memory/prshm.c
diff options
context:
space:
mode:
Diffstat (limited to 'nsprpub/pr/src/memory/prshm.c')
-rw-r--r--nsprpub/pr/src/memory/prshm.c54
1 files changed, 29 insertions, 25 deletions
diff --git a/nsprpub/pr/src/memory/prshm.c b/nsprpub/pr/src/memory/prshm.c
index 59237e6e7..7a587cd5d 100644
--- a/nsprpub/pr/src/memory/prshm.c
+++ b/nsprpub/pr/src/memory/prshm.c
@@ -20,39 +20,39 @@ extern PRLogModuleInfo *_pr_shm_lm;
/* Posix implementation is in pr/src/md/unix/uxshm.c */
#elif defined PR_HAVE_WIN32_NAMED_SHARED_MEMORY
/* Win32 implementation is in pr/src/md/windows/w32shm.c */
-#else
-/*
-** there is no named_shared_memory
+#else
+/*
+** there is no named_shared_memory
*/
extern PRSharedMemory* _MD_OpenSharedMemory( const char *name, PRSize size, PRIntn flags, PRIntn mode )
{
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
return NULL;
-}
+}
extern void * _MD_AttachSharedMemory( PRSharedMemory *shm, PRIntn flags )
{
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
return NULL;
-}
+}
extern PRStatus _MD_DetachSharedMemory( PRSharedMemory *shm, void *addr )
{
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
return PR_FAILURE;
-}
+}
extern PRStatus _MD_CloseSharedMemory( PRSharedMemory *shm )
{
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
return PR_FAILURE;
-}
+}
extern PRStatus _MD_DeleteSharedMemory( const char *name )
{
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
return PR_FAILURE;
-}
+}
#endif /* HAVE_SYSV_NAMED_SHARED_MEMORY */
/*
@@ -60,14 +60,16 @@ extern PRStatus _MD_DeleteSharedMemory( const char *name )
**
*/
PR_IMPLEMENT( PRSharedMemory * )
- PR_OpenSharedMemory(
- const char *name,
- PRSize size,
- PRIntn flags,
- PRIntn mode
+PR_OpenSharedMemory(
+ const char *name,
+ PRSize size,
+ PRIntn flags,
+ PRIntn mode
)
{
- if (!_pr_initialized) _PR_ImplicitInitialization();
+ if (!_pr_initialized) {
+ _PR_ImplicitInitialization();
+ }
return( _PR_MD_OPEN_SHARED_MEMORY( name, size, flags, mode ));
} /* end PR_OpenSharedMemory() */
@@ -76,9 +78,9 @@ PR_IMPLEMENT( PRSharedMemory * )
**
*/
PR_IMPLEMENT( void * )
- PR_AttachSharedMemory(
- PRSharedMemory *shm,
- PRIntn flags
+PR_AttachSharedMemory(
+ PRSharedMemory *shm,
+ PRIntn flags
)
{
return( _PR_MD_ATTACH_SHARED_MEMORY( shm, flags ));
@@ -89,9 +91,9 @@ PR_IMPLEMENT( void * )
**
*/
PR_IMPLEMENT( PRStatus )
- PR_DetachSharedMemory(
- PRSharedMemory *shm,
- void *addr
+PR_DetachSharedMemory(
+ PRSharedMemory *shm,
+ void *addr
)
{
return( _PR_MD_DETACH_SHARED_MEMORY( shm, addr ));
@@ -102,8 +104,8 @@ PR_IMPLEMENT( PRStatus )
**
*/
PR_IMPLEMENT( PRStatus )
- PR_CloseSharedMemory(
- PRSharedMemory *shm
+PR_CloseSharedMemory(
+ PRSharedMemory *shm
)
{
return( _PR_MD_CLOSE_SHARED_MEMORY( shm ));
@@ -114,11 +116,13 @@ PR_IMPLEMENT( PRStatus )
**
*/
PR_EXTERN( PRStatus )
- PR_DeleteSharedMemory(
- const char *name
+PR_DeleteSharedMemory(
+ const char *name
)
{
- if (!_pr_initialized) _PR_ImplicitInitialization();
+ if (!_pr_initialized) {
+ _PR_ImplicitInitialization();
+ }
return(_PR_MD_DELETE_SHARED_MEMORY( name ));
} /* end PR_DestroySharedMemory() */
/* end prshm.c */