Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 67771 Details for
Bug 131423
New AC - Create Shared Memory on Linux EM64T platform needs getMaxShared memory function.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
patch_131423.txt (text/plain), 2.52 KB, created by
Igor Alelekov
on 2007-05-18 02:52:30 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Igor Alelekov
Created:
2007-05-18 02:52:30 EDT
Size:
2.52 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.platform.agentcontroller >Index: src-native-new/src/transport/transportSupport/TransportSupportSharedMem.c >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.agentcontroller/src-native-new/src/transport/transportSupport/TransportSupportSharedMem.c,v >retrieving revision 1.15 >diff -u -r1.15 TransportSupportSharedMem.c >--- src-native-new/src/transport/transportSupport/TransportSupportSharedMem.c 9 Apr 2007 17:01:24 -0000 1.15 >+++ src-native-new/src/transport/transportSupport/TransportSupportSharedMem.c 18 May 2007 06:41:20 -0000 >@@ -30,12 +30,12 @@ > #endif > /* Required for getting system parameters */ > #if defined __linux__ >- #include <linux/unistd.h> >- #include <linux/types.h> >- #include <linux/sysctl.h> >- #include <sys/syscall.h> >- #include <unistd.h> >-#else >+ #include <sys/ipc.h> >+ #include <sys/shm.h> >+ >+ #ifndef IPC_INFO >+ #define IPC_INFO 3 >+ #endif > #endif > > int myGlobalSock = -1; >@@ -53,8 +53,6 @@ > * defined max value or not. If the requested size is more than system defined > * size, change the requested size to a value lower than system defined max > * value. >-* NOTE: This code is not ported for EM64T Linux and hence not being invoked >-* at this time > * > * @param size - the requested shared memory segment size > *************************************************************************/ >@@ -102,12 +100,13 @@ > > #elif __linux__ > int rc; >- int name[] = { CTL_KERN, KERN_SHMMAX }; >- size_t shmmaxlen = sizeof(int); >- struct __sysctl_args args = { name, sizeof(name), &shmmax, &shmmaxlen, 0, 0 }; >- >- rc = syscall(SYS__sysctl, &args); >- if(rc || (shmmax == 0)) { >+ struct shminfo info; >+ >+ rc = shmctl(0, IPC_INFO, (struct shmid_ds *) (void*) &info); // to make compiler happy >+ if (rc >= 0) >+ shmmax = info.shmmax; >+ >+ if(shmmax <= 0) { > TPTP_LOG_ERROR_MSG("Cannot get system shared memory setting"); > shmmax = 33554432; // default for Linux systems > } >@@ -357,12 +356,8 @@ > if (shmBufSize < RA_SHM_BUF_SIZE_MIN) > shmBufSize = RA_SHM_BUF_SIZE_MIN ; > >-#ifndef __x86_64__ >-// The validateSystemShmMax is not ported to work on Linux EM64T platform >-// Hence invoking this function only for other platforms. For things to work on >-// Linux EM64T, the default shared mem chunk size is set to 8MB > shmBufSize = validateSystemShmMax(shmBufSize); >-#endif >+ > TPTP_LOG_DEBUG_MSG2("Shared mem name(%s) size(%d) \n", pMemName, shmBufSize) ; > shmerr = ra_createShm((char*) pMemName, shmBufSize, pShmHdl) ; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 131423
: 67771