diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-BE70DCBF-366A-5054-B0F1-7FCEF45FC735.dita --- a/Symbian3/PDK/Source/GUID-BE70DCBF-366A-5054-B0F1-7FCEF45FC735.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-BE70DCBF-366A-5054-B0F1-7FCEF45FC735.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,40 +1,40 @@ - - - - - -Creating and Unlinking a File Descriptor from a Shared Memory

The shm_open() function enables you to create shared memory and associate a file descriptor. Use the shm_unlink() function to remove (unlink a file descriptor from a shared memory) the name of the shared memory object.

Example:

#include <stdio.h> -#include <sys/mman.h> -#include <fcntl.h> -#include <errno.h> -int main(void) - { - int fd;// File Descriptor - int ret; - if((fd = shm_open("page", O_RDWR|O_CREAT, 0666)) < 0) - { - printf("Shared memory creation failed with errno %d\n", errno); - } - else - { - printf("Shared memory creation was successful\n"); - } - close(fd);//closing the file descriptor - if((ret = shm_unlink("page")) < 0) - { - printf("Shared memory unlinking failed with errno %d\n", errno); - } - else - { - printf("Shared memory unlinking was successful\n"); - } - return ret; - }
Librt Overview Writing, Reading and Seeking from a - Shared Memory Retrieving Information about a + + + + + +Creating and Unlinking a File Descriptor from a Shared Memory

The shm_open() function enables you to create shared memory and associate a file descriptor. Use the shm_unlink() function to remove (unlink a file descriptor from a shared memory) the name of the shared memory object.

Example:

#include <stdio.h> +#include <sys/mman.h> +#include <fcntl.h> +#include <errno.h> +int main(void) + { + int fd;// File Descriptor + int ret; + if((fd = shm_open("page", O_RDWR|O_CREAT, 0666)) < 0) + { + printf("Shared memory creation failed with errno %d\n", errno); + } + else + { + printf("Shared memory creation was successful\n"); + } + close(fd);//closing the file descriptor + if((ret = shm_unlink("page")) < 0) + { + printf("Shared memory unlinking failed with errno %d\n", errno); + } + else + { + printf("Shared memory unlinking was successful\n"); + } + return ret; + }
Librt Overview Writing, Reading and Seeking from a + Shared Memory Retrieving Information about a Shared Memory Object Clocks and Timers Tutorial
\ No newline at end of file