semexample.h
来自「风河官方例程原代码之multi-processing的shared_Semaph」· C头文件 代码 · 共 27 行
H
27 行
/*******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 + =
减小字号Ctrl + -
显示快捷键?