1 /* --COPYRIGHT--,ESD
2 * Copyright (c) 2008 Texas Instruments. All rights reserved.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v1.0 and Eclipse Distribution License
5 * v. 1.0 which accompanies this distribution. The Eclipse Public License is
6 * available at http://www.eclipse.org/legal/epl-v10.html and the Eclipse
7 * Distribution License is available at
8 * http://www.eclipse.org/org/documents/edl-v10.php.
9 *
10 * Contributors:
11 * Texas Instruments - initial implementation
12 * --/COPYRIGHT--*/
13 /*
14 * ======== ISemProcessSupport.xdc ========
15 */
16
17 import xdc.runtime.Error;
18
19 /*!
20 * ======== ISemProcessSupport ========
21 * Interface for OS specific back-end. [EXPERIMENTAL]
22 *
23 * The {@link xdc.runtime.knl} package contains modules that provide typical
24 * OS services. These xdc.runtime.knl modules however require proxies to be
25 * bound to an OS specific delegate. This specifies the interface to
26 * be implemented by the OS specific delegate for
27 * {@link xdc.runtime.knl#SemProcess} module.
28 *
29 * create() takes a 32-bit integer key parameter to be used for identifying
30 * the semaphore to create across processes. For example, for Linux System V
31 * semaphores, the key is necessary so that different processes can access
32 * the same semaphore.
33 */
34 interface ISemProcessSupport inherits ISemaphore
35 {
36
37 instance:
38
39 /*!
40 * ======== create ========
41 * Create a SemProcess object.
42 *
43 * This function creates a new `SemProcess` object which is
44 * initialized to count.
45 * All semaphores created with the same key reference the same
46 * underlying synchronization object and work between processes. The
47 * underlying synchronization object should be automatically deleted when
48 * all references to it have been deleted, and the reference count should
49 * be maintained consistently across process forks or similar operations.
50 * An implementation for a platform on which this is technically impossible
51 * (e.g. an operating system that does not support multiple processes) may
52 * provide a 'toy' implementation with behavior matching that of
53 * `{@link ISemProcessSupport}`.
54 *
55 * @param(count) initial semaphore count
56 * @param(key) globally unique key
57 */
58 create(Int count, Int key);
59
60 }
61
62 /*
63 *! Revision History
64 *! ================
65 *! 17-Apr-2009 nitya Review updates
66 */
67 /*
68 * @(#) xdc.runtime.knl; 1, 0, 0,23; 7-29-2009 14:53:49; /db/ztree/library/trees/xdc-t56x/src/packages/
69 */
70