📄 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 + -