OS_NS_sys_shm.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // OS_NS_sys_shm.inl,v 1.15 2006/02/13 08:40:52 jwillemsen Exp
00004 
00005 #include "ace/OS_NS_errno.h"
00006 
00007 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00008 
00009 ACE_INLINE void *
00010 ACE_OS::shmat (int int_id, const void *shmaddr, int shmflg)
00011 {
00012   ACE_OS_TRACE ("ACE_OS::shmat");
00013 #if defined (ACE_HAS_SYSV_IPC)
00014 #  if defined (ACE_HAS_CHARPTR_SHMAT)
00015   ACE_OSCALL_RETURN (::shmat (int_id, static_cast <char*> (const_cast <void *>(shmaddr)), shmflg), void *, (void *) -1);
00016 #  else
00017   ACE_OSCALL_RETURN (::shmat (int_id, shmaddr, shmflg), void *, (void *) -1);
00018 #  endif /* ACE_HAS_CHARPTR_SHMAT */
00019 #else
00020   ACE_UNUSED_ARG (int_id);
00021   ACE_UNUSED_ARG (shmaddr);
00022   ACE_UNUSED_ARG (shmflg);
00023 
00024   ACE_NOTSUP_RETURN ((void *) -1);
00025 #endif /* ACE_HAS_SYSV_IPC */
00026 }
00027 
00028 ACE_INLINE int
00029 ACE_OS::shmctl (int int_id, int cmd, struct shmid_ds *buf)
00030 {
00031   ACE_OS_TRACE ("ACE_OS::shmctl");
00032 #if defined (ACE_HAS_SYSV_IPC)
00033   ACE_OSCALL_RETURN (::shmctl (int_id, cmd, buf), int, -1);
00034 #else
00035   ACE_UNUSED_ARG (buf);
00036   ACE_UNUSED_ARG (cmd);
00037   ACE_UNUSED_ARG (int_id);
00038 
00039   ACE_NOTSUP_RETURN (-1);
00040 #endif /* ACE_HAS_SYSV_IPC */
00041 }
00042 
00043 ACE_INLINE int
00044 ACE_OS::shmdt (const void *shmaddr)
00045 {
00046   ACE_OS_TRACE ("ACE_OS::shmdt");
00047 #if defined (ACE_HAS_SYSV_IPC)
00048 #  if defined (ACE_HAS_CHARPTR_SHMDT)
00049      ACE_OSCALL_RETURN (::shmdt (
00050       static_cast <char*> (const_cast <void *>(shmaddr))), int, -1);
00051 # else
00052      ACE_OSCALL_RETURN (::shmdt (shmaddr), int, -1);
00053 #  endif /* ACE_HAS_CHARPTR_SHMDT */
00054 #else
00055   ACE_UNUSED_ARG (shmaddr);
00056 
00057   ACE_NOTSUP_RETURN (-1);
00058 #endif /* ACE_HAS_SYSV_IPC */
00059 }
00060 
00061 ACE_INLINE int
00062 ACE_OS::shmget (key_t key, size_t size, int flags)
00063 {
00064   ACE_OS_TRACE ("ACE_OS::shmget");
00065 #if defined (ACE_HAS_SYSV_IPC)
00066   ACE_OSCALL_RETURN (::shmget (key, size, flags), int, -1);
00067 #else
00068   ACE_UNUSED_ARG (flags);
00069   ACE_UNUSED_ARG (size);
00070   ACE_UNUSED_ARG (key);
00071 
00072   ACE_NOTSUP_RETURN (-1);
00073 #endif /* ACE_HAS_SYSV_IPC */
00074 }
00075 
00076 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 09:41:58 2006 for ACE by doxygen 1.3.6