diff options
Diffstat (limited to 'examples/Shared_Memory')
-rw-r--r-- | examples/Shared_Memory/Makefile | 120 | ||||
-rw-r--r-- | examples/Shared_Memory/Shared_Memory.dsw | 41 | ||||
-rw-r--r-- | examples/Shared_Memory/test_MM.cpp | 66 | ||||
-rw-r--r-- | examples/Shared_Memory/test_MM.dsp | 115 | ||||
-rw-r--r-- | examples/Shared_Memory/test_SV.cpp | 63 | ||||
-rw-r--r-- | examples/Shared_Memory/test_SV.dsp | 115 |
6 files changed, 0 insertions, 520 deletions
diff --git a/examples/Shared_Memory/Makefile b/examples/Shared_Memory/Makefile deleted file mode 100644 index 9b469aea742..00000000000 --- a/examples/Shared_Memory/Makefile +++ /dev/null @@ -1,120 +0,0 @@ -#---------------------------------------------------------------------------- -# $Id$ -# -# Makefile for tests of the Shared_Malloc wrappers -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = test_MM \ - test_SV - -LSRC = test_MM.cpp \ - test_SV.cpp - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -INSTALL = - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - -.obj/test_MM.o .obj/test_MM.so .shobj/test_MM.o .shobj/test_MM.so: test_MM.cpp $(ACE_ROOT)/ace/Shared_Memory_MM.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/Shared_Memory.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/Time_Value.inl \ - $(ACE_ROOT)/ace/Default_Constants.h \ - $(ACE_ROOT)/ace/Global_Macros.h \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Trace.h $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Shared_Memory_MM.i \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl - -.obj/test_SV.o .obj/test_SV.so .shobj/test_SV.o .shobj/test_SV.so: test_SV.cpp $(ACE_ROOT)/ace/Shared_Memory_SV.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/Shared_Memory.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/Time_Value.inl \ - $(ACE_ROOT)/ace/Default_Constants.h \ - $(ACE_ROOT)/ace/Global_Macros.h \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Trace.h $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/SV_Shared_Memory.h \ - $(ACE_ROOT)/ace/SV_Shared_Memory.i \ - $(ACE_ROOT)/ace/Shared_Memory_SV.i \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Shared_Memory/Shared_Memory.dsw b/examples/Shared_Memory/Shared_Memory.dsw deleted file mode 100644 index a285cb2a0dc..00000000000 --- a/examples/Shared_Memory/Shared_Memory.dsw +++ /dev/null @@ -1,41 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Examples SV_test_MM"=.\test_MM.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "Examples SV_test_SV"=.\test_SV.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/Shared_Memory/test_MM.cpp b/examples/Shared_Memory/test_MM.cpp deleted file mode 100644 index f26d58f4310..00000000000 --- a/examples/Shared_Memory/test_MM.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// $Id$ - -#include "ace/Shared_Memory_MM.h" -#include "ace/Log_Msg.h" - -ACE_RCSID(Shared_Memory, test_MM, "$Id$") - -#define SHMSZ 27 -char shm_key[] = "/tmp/fooXXXXXX"; - -static void -client (void) -{ - ACE_Shared_Memory *shm_client = new ACE_Shared_Memory_MM (shm_key); - char *shm = (char *) shm_client->malloc (); - - for (char *s = shm; *s != '\0'; s++) - putchar (*s); - - putchar ('\n'); - *shm = '*'; -} - -static void -server (void) -{ - ACE_Shared_Memory *shm_server = new ACE_Shared_Memory_MM (shm_key, SHMSZ); - char *shm = (char *) shm_server->malloc (); - char *s = shm; - - for (char c = 'a'; c <= 'z'; c++) - *s++ = c; - - *s = '\0'; - - // Perform a busy wait (ugh) - while (*shm != '*') - ACE_OS::sleep (1); - - if (shm_server->remove () < 0) - ACE_ERROR ((LM_ERROR, "%p\n", "remove")); - ACE_OS::unlink (shm_key); -} - -int -main (int, char *[]) -{ - if (ACE_OS::mktemp (shm_key) == 0 || (ACE_OS::unlink (shm_key) == -1 && errno == EPERM)) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", shm_key), 1); - - switch (ACE_OS::fork ()) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "fork"), 1); - case 0: - // Make sure the server starts up first. - ACE_OS::sleep (1); - client (); - break; - default: - server (); - break; - } - return 0; -} - diff --git a/examples/Shared_Memory/test_MM.dsp b/examples/Shared_Memory/test_MM.dsp deleted file mode 100644 index a08ff8c8fb2..00000000000 --- a/examples/Shared_Memory/test_MM.dsp +++ /dev/null @@ -1,115 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Examples SV_test_MM" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Examples SV_test_MM - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test_MM.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_MM.mak" CFG="Examples SV_test_MM - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Examples SV_test_MM - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Examples SV_test_MM - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Examples SV_test_MM - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release\test_MM"
-# PROP BASE Intermediate_Dir "Release\test_MM"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release\test_MM"
-# PROP Intermediate_Dir "Release\test_MM"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c
-# ADD CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c /D "NDEBUG" /O2 /MD /I "../../"
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386 ../../ace/ACE.lib /out:"test_MM.exe"
-
-!ELSEIF "$(CFG)" == "Examples SV_test_MM - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ""
-# PROP BASE Intermediate_Dir "Debug\test_MM"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug\test_MM"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c /Gm /Zi
-# ADD CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c /Gm /Zi /D "_DEBUG" /Od /MDd /I "../../"
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /debug /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /machine:I386 /debug /pdbtype:sept ../../ace/ACEd.lib /out:"test_MM.exe"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Examples SV_test_MM - Win32 Release"
-# Name "Examples SV_test_MM - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\test_MM.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;fi;fd"
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter "idl;pidl"
-# End Group
-# Begin Group "Inline Files"
-
-# PROP Default_Filter "inl;i"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/Shared_Memory/test_SV.cpp b/examples/Shared_Memory/test_SV.cpp deleted file mode 100644 index f341f976639..00000000000 --- a/examples/Shared_Memory/test_SV.cpp +++ /dev/null @@ -1,63 +0,0 @@ -// $Id$ - -#include "ace/Shared_Memory_SV.h" -#include "ace/Log_Msg.h" - -ACE_RCSID(Shared_Memory, test_SV, "$Id$") - -#define SHMSZ 27 -#define SHM_KEY (key_t) 5678 - -static void -client (void) -{ - ACE_Shared_Memory_SV shm_client (SHM_KEY, SHMSZ); - char *shm = (char *) shm_client.malloc (); - - for (char *s = shm; *s != '\0'; s++) - putchar (*s); - - putchar ('\n'); - *shm = '*'; -} - -static void -server (void) -{ - ACE_Shared_Memory_SV shm_server (SHM_KEY, SHMSZ, - ACE_Shared_Memory_SV::ACE_CREATE); - char *shm = (char *) shm_server.malloc (); - char *s = shm; - - for (char c = 'a'; c <= 'z'; c++) - *s++ = c; - - *s = '\0'; - - while (*shm != '*') - ACE_OS::sleep (1); - - if (shm_server.remove () < 0) - ACE_ERROR ((LM_ERROR, "%p\n", "remove")); -} - -int -main (int, char *[]) -{ - switch (ACE_OS::fork ()) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "fork"), 1); - case 0: - // Make sure the server starts up first. - ACE_OS::sleep (1); - client (); - break; - default: - server (); - break; - } - - return 0; -} - diff --git a/examples/Shared_Memory/test_SV.dsp b/examples/Shared_Memory/test_SV.dsp deleted file mode 100644 index d948ae32767..00000000000 --- a/examples/Shared_Memory/test_SV.dsp +++ /dev/null @@ -1,115 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Examples SV_test_SV" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Examples SV_test_SV - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test_SV.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_SV.mak" CFG="Examples SV_test_SV - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Examples SV_test_SV - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Examples SV_test_SV - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Examples SV_test_SV - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release\test_SV"
-# PROP BASE Intermediate_Dir "Release\test_SV"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release\test_SV"
-# PROP Intermediate_Dir "Release\test_SV"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c
-# ADD CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c /D "NDEBUG" /O2 /MD /I "../../"
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386 ../../ace/ACE.lib /out:"test_SV.exe"
-
-!ELSEIF "$(CFG)" == "Examples SV_test_SV - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ""
-# PROP BASE Intermediate_Dir "Debug\test_SV"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug\test_SV"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c /Gm /Zi
-# ADD CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c /Gm /Zi /D "_DEBUG" /Od /MDd /I "../../"
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /debug /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /machine:I386 /debug /pdbtype:sept ../../ace/ACEd.lib /out:"test_SV.exe"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Examples SV_test_SV - Win32 Release"
-# Name "Examples SV_test_SV - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\test_SV.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;fi;fd"
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter "idl;pidl"
-# End Group
-# Begin Group "Inline Files"
-
-# PROP Default_Filter "inl;i"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
|