⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmos.c

📁 wince host 和 target PCI驱动程序
💻 C
字号:
/*---------------------------------------------------------------------------- 
COPYRIGHT (c) 1996 by Philips Semiconductors

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED AND COPIED IN 
ACCORDANCE WITH THE TERMS AND CONDITIONS OF SUCH A LICENSE AND WITH THE 
INCLUSION OF THE THIS COPY RIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES 
OF THIS SOFTWARE MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER
PERSON. THE OWNERSHIP AND TITLE OF THIS SOFTWARE IS NOT TRANSFERRED. 

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT ANY PRIOR NOTICE
AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY Philips Semiconductor. 

PHILIPS ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF THIS SOFTWARE
ON PLATFORMS OTHER THAN THE ONE ON WHICH THIS SOFTWARE IS FURNISHED.
----------------------------------------------------------------------------*/

/*	tmos.c	HISTORY	#define	TR	"Tilakraj Roy"	960426	TR	Created	960428	TR	Added IPC layer to this file 	960703	TR	Ported to release 2.2 for lcf 	960917	TR	Pulled in from RTX demo code made pSOS specific changes
	961210	TR	Put in calls to Juul's dynamic loader

	COMMENTS 
	This is the OS dependent component of TriMedia Manager. This component 
	talsk with the OS via interface calls to start and stop tasks when
	requested by the host.*//* CRT includes */
#include <stdio.h>
/* TriMedia standard shared includes */#include "tmman.h"#include "tmhd.h"#include "tmos.h"

PVOID	pTaskMgr;

STATUS	tmosInit ( VOID );
STATUS	tmosExit ( VOID );

/*
	tmosInit 
	This function initializes the TMOS component of TMMAN. Since TMOS is a layer
	above TMMan, it requrires the TMMan to be completely functional before it is
	called. 
	
	This entry point does the following.

	It creates a message queue to communicate with its host counterpart. This
	message queue is used to service task related requests from the host.

	It creates a system task that blocks on servicing requests from the host.
	This system task blocks on either a semaphore or an OS message queue.

	This function is not called if pSOS is not running on the system. So it can assume 
	that pSOS is always running.
*/
STATUS	tmosInit ( VOID )
{
	PVOID	pDummy;
	DWORD	IORetVal;
	DWORD	PSOSStatus;
	STATUS	Status;

	if ( ( Status = taskmCreate ( 0x10, &pTaskMgr ) ) != TMOK ) /* HARDCODED */
	{
		DT(0, "tmosInit:taskmCreate:FAIL[%x]\n", Status );
		goto	tmosInitExit;
	}

tmosInitExit :
	return Status;
}

/*
	tmosExit

	Undoes the effect of tmosInit
*/
STATUS	tmosExit ( VOID )
{
	taskmDestroy ( pTaskMgr );
	return TMOK;
}

STATUS	tmosTaskGetState ( DWORD OSTaskID, PDWORD StatePtr )
{
	return taskGetState ( OSTaskID, StatePtr );
}

PVOID	GetTaskMgrObject(VOID)
{
	return pTaskMgr;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -