os/ossrv/genericopenlibs/posixrealtimeextensions/test/testsharedmemory/childprocess/src/openshmem.c
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 * Name        : openshmem.c
    16 * To validate usuage of shared memory in the different process
    17 * 
    18 *
    19 */
    20 
    21 
    22 
    23 // INCLUDE FILES
    24 
    25 
    26 #include <sys/mman.h>
    27 #include <sys/fcntl.h>
    28 #include <unistd.h>
    29 
    30 int main()
    31 	{	
    32 	int fd;
    33 	fd = shm_open("shmemtest",O_RDWR,0777);
    34 	if (fd > 0)
    35 		{
    36 		close(fd);
    37 		return 1;
    38 		}
    39 	else
    40 		{
    41 		return 0;
    42 		}	
    43 	}
    44 
    45 //  End of File