?? semexample.h
字號:
/*******Shared Semaphore Code ExampleThe following code example depicts two tasks executing on different CPUs and using shared semaphores. The routine semTask1( ) creates the shared semaphore, initializing the state to full. It adds the semaphore to the name database (to enable the task on the other CPU to access it), takes the semaphore, does some processing, and gives the sema-phore. The task semTask2( ) gets the semaphore ID from the database, takes the sema-phore, does some processing, and gives the semaphore. o The common header file is semExample.h:****************//* semExample.h - shared semaphore example header file *//* Copyright 1984-1997 Wind River Systems, Inc. *//*modification history--------------------01b,06nov97,mm added copyright. 01a,??? written.*/#define SEM_NAME "mySmSemaphore"
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -