diff options
author | Andrew Niefer | 2007-01-16 22:22:51 +0000 |
---|---|---|
committer | Andrew Niefer | 2007-01-16 22:22:51 +0000 |
commit | de9a521a158b9c93f48c593fc7c55739247a9c13 (patch) | |
tree | a9d9493c180ad7f6c12d9a301450acb0352c6c92 /bundles/org.eclipse.equinox.executable/library/eclipseShm.h | |
parent | ae98f7e7567709aff2e04f0fb01440dfabbac5ec (diff) | |
download | rt.equinox.framework-de9a521a158b9c93f48c593fc7c55739247a9c13.tar.gz rt.equinox.framework-de9a521a158b9c93f48c593fc7c55739247a9c13.tar.xz rt.equinox.framework-de9a521a158b9c93f48c593fc7c55739247a9c13.zip |
changes for bug 168775 & improved error handling on JNI calls
Diffstat (limited to 'bundles/org.eclipse.equinox.executable/library/eclipseShm.h')
-rw-r--r-- | bundles/org.eclipse.equinox.executable/library/eclipseShm.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseShm.h b/bundles/org.eclipse.equinox.executable/library/eclipseShm.h new file mode 100644 index 000000000..be3b5d3ac --- /dev/null +++ b/bundles/org.eclipse.equinox.executable/library/eclipseShm.h @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright (c) 2000, 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + * Silenio Quarti + *******************************************************************************/ + +#ifndef ECLIPSE_SHM_H +#define ECLIPSE_SHM_H + +#ifdef UNICODE +#define createSharedData createSharedDataW +#define destroySharedData destroySharedDataW +#define getSharedData getSharedDataW +#define setSharedData setSharedDataW +#endif + +/* Shared memory utilities */ + +/** + * Creates and initializes a shared memory segment + * with the specified size in bytes. The id for the + * shared memory segment is stored in the id argument + * and can be used from any process. It must be freed + * with free(). + * + * Returns 0 if success. + */ +extern int createSharedData(_TCHAR** id, int size); + +/** + * Destroy the shared memory segment specified by the + * id argument. The id is the same as the one return + * by createSharedData(). This function must be called + * by the same process that created the segment. + * + * Returns 0 if success. + */ +extern int destroySharedData(_TCHAR* id); + +/** + * Gets a copy of the shared memory segment specified + * by the id argument. The copy is stored in the data + * argument as a null terminated string and must be + * freed by free(). + * + * Returns 0 if success. + */ +extern int getSharedData(_TCHAR* id, _TCHAR** data); + +/** + * Sets the shared memory segment specified by the id + * argument with a null terminated string specified by + * data. + * + * Returns 0 if sucess. + */ +extern int setSharedData(const _TCHAR* id, const _TCHAR* data); + +#endif /* ECLIPSE_SHM_H */ + + |