freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

tornadovxworks培訓(xùn)(存儲(chǔ)版)

2024-10-11 14:26上一頁面

下一頁面
  

【正文】 務(wù)被停止時(shí),所要保存的所有信息。 – 當(dāng)更高優(yōu)先級(jí)的任務(wù)由就緒態(tài)進(jìn)入運(yùn)行時(shí),系統(tǒng)內(nèi)核立即保存當(dāng)前任務(wù)的上下文,切換到更高優(yōu)先級(jí)的任務(wù)。一個(gè)被多個(gè)任務(wù)調(diào)用的單個(gè)拷貝稱為共享代碼。 – 由信號(hào)量保護(hù)的全局或靜態(tài)變量 ? VxWorks的一些庫封裝對(duì)公共數(shù)據(jù)的訪問。這種搶占禁止防止任務(wù)的切換,但對(duì)中斷處理不起作用。 ... } STATUS taskDelay (ticks) Use sysClkRateSet() to change the clock rate. Accurate only if clock rate is a multiple of seven ticks / seconds. Can suffer from “drift.” 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 Reentrancy and Task Variables If tasks access the same global or static variables, the resource can bee corrupted (called a race condition). Possible Solutions: Task Variables cause a 32bit value to be saved and restored on context switchs, like a register. Use only stack variables in applications. Protect the resource with a semaphore. Use task variables to make the variable private to a task Caveat: task variables increase context switch times. See the taskVarLib manual pages for details. 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 Task Hooks Userdefined code can be executed on every context switch, at task creation, or at task deletion: taskSwitchHookAdd () taskCreateHookAdd () taskDeleteHookAdd () VxWorks uses a switch hook to implement task variables. See manual pages on taskHookLib for details. 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 Task Information Like i(), but also displays: Can also use show (): show (tNetTask, 1) Stack information Task options CPU registers FPU registers (if the VX_FP_TASK option bit is set) ti (taskNameOrId) 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 Task Browser To obtain information about a specific task, click on the task?s summary line in the main target browser. 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 What is POSIX ? Originally, an IEEE mittee convened to create a standard interface to UNIX for: VxWors supports almost all of the POSIX Realtime Extensions. Increased portability. Convenience. Context switch times are very fast. Text, data, and bss are stored in a mon, global address space. The POSIX realtime extensions are based on implicit assumptions about the UNIX process model which do not always hold in VxWorks. In VxWorks, 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 What does VxWorks support ? Library Description aioPxLib Asynchornous I/O semPxLib POSIX Semaphores mqPxLib POSIX Message Queues mmanPxLib POSIX Memory Management schedPxLib POSIX Scheduler Interface sigLib POSIX Signals timerLib, clockLib POSIX Timer/Clock Interface dirLib File/Directory Information 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 RealTime Multitasking Introduction Task Basics Task Control Error Status System Tasks 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 Error Status ? VxWorks里使用一個(gè)全局整型變量 errno來描述錯(cuò)誤信息 – 程序執(zhí)行過程中我們可以設(shè)置并調(diào)用一些函數(shù)例程來檢測(cè)錯(cuò)誤信息,并針對(duì)錯(cuò)誤信息設(shè)置相應(yīng)的錯(cuò)誤號(hào) – 然后調(diào)用一些函數(shù)例程檢測(cè)錯(cuò)誤號(hào),當(dāng)程序執(zhí)行異常時(shí)可以根據(jù)錯(cuò)誤號(hào)發(fā)現(xiàn)相應(yīng)的錯(cuò)誤 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 Errno and Context Switches At each context switch, the kernel saves and restores the value of errno. TCB errorStatus errno 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 Setting Errno Lowest level routine to detect an error sets errno and returns ERROR: STATUS myRoutine () { ... if (myNumFlurbishes = MAX_FLURBISH) { errno = s_myLib_TOO_MANY_FLURBISHES。 case S_rctorLib_LEAK_POSSIBLE: checkVessel ()。 end。 } 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 PV原語(二) ? 其中用到兩個(gè)標(biāo)準(zhǔn)過程: asleep()。 waitForData ()。 /* store data here */ 2 int myBufIndex = 1。 13 } 14 15 void myBufPut (char ch) 16 { 17 semTake(mySemId, WAIT_OREVER)。而且,假想任務(wù)沒有機(jī)會(huì)釋放該資源,那麼現(xiàn)在其他任何任務(wù)現(xiàn)在就不能獲得該資源,資源被凍結(jié)了。畢竟資源是不可被搶占的。當(dāng)執(zhí)行完成,任務(wù)釋放該資源并返回到它正常的或標(biāo)準(zhǔn)的優(yōu)先級(jí)。這防止了 T3,間接地防止 T1,被 T2搶占。當(dāng) T1搶占 T3,為競(jìng)爭(zhēng)使用該資源而請(qǐng)求相同的信號(hào)量的時(shí)候,它被阻塞。 ? 我們?cè)O(shè)想下面的情況:一個(gè)任務(wù)獲得一些數(shù)據(jù)結(jié)構(gòu)的互斥訪問權(quán),當(dāng)它正在臨界區(qū)內(nèi)執(zhí)行時(shí)被另一個(gè)任務(wù)刪除。 /* Index of last data */ 6 LOCAL SEM_ID mySemId。 3. repeat (3, semGive, semId)。 ? 信號(hào)量機(jī)制必須有公共內(nèi)存,不能用于分布式操作系統(tǒng),這是它最大的弱點(diǎn)。 { =+1。它的類型定義如下:(用類PASCAL語言表述) semaphore = record value: integer。 case S_rctorLib_TEMP_CRITICAL_ZONE: logMsg (“Run!”)。 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 VxWorks怎樣滿足實(shí)時(shí)性需求 ? 多任務(wù)特性 ? 基于搶占式多任務(wù)調(diào)度 ? 快速的任務(wù)上下文切換 ? 快速確定的系統(tǒng)響應(yīng) ? 高效的任務(wù)間通訊機(jī)制 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 RealTime Multitasking Introduction Task Basics Task Control Error Status System Tasks 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 Overview Low level routines to create and manipulate tasks are found in taskLib. Do not confuse executable code with the task(s) which execute it. A VxWorks task consists of: A stack (for local storage of automatic variables and parameters passed to routines). A TCB (for OS control) Code is downloaded before tasks are spawned. Several tasks can execute the same code (., printf()). 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 Creating a Task taskSpawn Stack TCB PC foo () { ... } 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 Creating a Task int taskSpawn (name, priority, options, stackSize, entryPt, arg1, ..., arg10) name Task name, if NULL gives a default name. priority Task priority, 0255. options Task options . VX_UNBREAKABLE. stackSize Size of stack to be allocated in bytes. entryPt Address of code to start executing (initial PC) arg1, ..., arg10 Up to 10 arguments to entry point routine. Returns a task id or ERROR if unsuccessful. 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 Task ID?s Efficient 32bit handle for task. Assigned by kernel when task is created. May be reused after task exists. A task id of zero refers to task making call (self). Relevant taskLib routines: taskIdSelf() Get ID of calling task. taskIdListGet() Fill array with ID?s of all existing tasks. taskIdVerify() Verify a task ID is valid. Unique to each task. 嵌入式培訓(xùn)專題 微迪軟件培訓(xùn)中心 Task Names Provided for human convenience. Typically used only from the shell (during development). Within programs, use task Ids. By convention, start with a t. Default is an ascending integer following a t. Promotes interpretation as a task name. Doesn?t have to be unique (but usually is). Relevant taskLib routines. taskNa
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1