blob: 183d332e611c3a83df8b85abc4be34e87e8b324c [file] [log] [blame]
/* --COPYRIGHT--,ESD
* Copyright (c) 2008 Texas Instruments. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License
* v. 1.0 which accompanies this distribution. The Eclipse Public License is
* available at http://www.eclipse.org/legal/epl-v10.html and the Eclipse
* Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Texas Instruments - initial implementation
* --/COPYRIGHT--*/
/*
* ======== SemThread.xdc ========
*/
import xdc.runtime.Error;
import xdc.runtime.knl.ISemaphore;
import xdc.runtime.knl.ISemThreadSupport;
/*!
* ======== SemThread ========
* SemThread Manager. [EXPERIMENTAL]
*
* This module manages semaphores through its proxy ISemThreadSupport
* interface. It has a module wide config parameter
* {@link #Proxy} which needs to be bound to an OS specific delegate before
* this module can be used.
*
* Here is an example showing how the proxy is bound to an BIOS 6.x specific
* delegate.
*
* var SemThread = xdc.useModule('xdc.runtime.knl.SemThread');
* SemThread.Proxy = xdc.useModule('ti.sysbios.xdcruntime.SemThreadSupport');
*
* Typically the package containing the delegates have a Settings module that
* will bind all {@link xdc.runtime.knl} proxies. The following
* example sets up all the xdc.runtime.knl proxies.
*
* xdc.useModule("ti.sysbios.xdcruntime.Settings");
*
*/
@InstanceInitError /* because initialization can fail */
@InstanceFinalize /* have to SemThread_Proxy_delete(sem) on delete */
module SemThread inherits ISemaphore
{
/*! Proxy that needs to be bound to an OS specific delegate. */
proxy Proxy inherits ISemThreadSupport;
instance:
/*!
* ======== create ========
* Create a SemThread object.
*
* This function creates a new `SemThread` object which is initialized to
* count.
*
* @param(count) initial semaphore count
*/
create(Int count);
internal:
struct Instance_State {
Proxy.Handle proxyHandle;
}
}
/*
*! Revision History
*! ================
*! 17-Apr-2009 nitya Review updates
*/