Task

BirthWait Funct Wait for task valid and not task_num. CTask Class The Fs segment reg points to current CTask. DeathWait Funct Wait for task death. Exit Funct Terminate own task. FindTaskByTitle Funct Report current tasks on all cores. FindTaskCore Funct { Fs Funct Invalidate page at addr inst. IsSuspended Funct You might use this in a DrawIt() or Animatetask(). Kill Funct Terminate other task. LastTask Funct { SetSysFocusTask Funct { Spawn Funct Create task on core running at address. Suspend Funct Tell scheduler to skip task. TaskCoreRep Funct Report current tasks on a single core. TaskQueIns Funct Insert a task in the scheduler running task queue. TaskQueRem Funct Remove a task from the scheduler running task queue. TaskRep Funct Report current tasks on all cores. TaskValidate Funct return TRUE if task looks valid. TaskWait Funct Wait for idle. UsbCdcClose Funct { UsbCdcFlush Funct { UsbCdcGen Funct { UsbCdcLines Funct { UsbCdcOpen Funct { UsbCdcRead Funct Non-blocking: whatever's already in the ring. -1: gone/not open. UsbCdcWrite Funct Returns bytes accepted (== cnt on success), -1 if gone or not open. UsbDesc Funct Dump device k's device and configuration descriptors. UsbDevKind Funct USB_KIND_* of device k (0 to usb_n-1), -1 if gone. UsbDevLets Funct Mounted drive letters of device k: bit let-'A'. UsbDevName Funct "<manufacturer> <product>" of device k into buf (STR_LEN), 0 if it offers UsbEcmMAC Funct { UsbEcmPresent Funct An attached USB Ethernet adapter that can receive (EHCI or xHCI). UsbEcmRecv Funct Copies the next received frame to dst: bytes, 0 if none, -1 if no adapter. UsbEcmRep Funct USB Ethernet adapters and their counters. UsbEcmSend Funct 0 if sent, -1 if no adapter, a bad length or a failed transfer. Task UsbMount Funct Mount USB stick k at the first free letter of U-Z. Returns it, or 0. UsbMountAt Funct Mount stick k at drv_let, or the first free USB letter. Returns it, or 0. UsbMountVol Funct Mount the stick holding this BlkVolSerial() at first_drv_let, returning the UsbMsBlocks Funct Blocks of the last mounted stick, 0 once that handle has gone stale. UsbMsdRep Funct List the USB storage devices so Mount() and the installer can tell two UsbRep Funct List USB host controllers and the devices found on them. UsbVenAlt Funct Alternate setting in use on function k, -1 if UsbVenGen fails. UsbVenBinArm Funct Queue one async bulk-IN transfer on function k, for UsbVenBinPoll. UsbVenBinCancel Funct Cancel the async bulk-IN UsbVenBinArm queued, if any. UsbVenBinPoll Funct Non-blocking: the transfer UsbVenBinArm queued. UsbVenCls Funct Interface class << 16 | subclass << 8 | protocol of function k. UsbVenCtl Funct Control request to function k's device. Returns the bytes transferred. UsbVenCtlOut Funct OUT control request with a data stage of len bytes from buf. UsbVenEp Funct Bulk IN (dirin) or OUT endpoint number of function k, 0 if it has none. UsbVenFind Funct UsbRep number of the n-th function of this kind with this VID and PID. UsbVenGen Funct Generation of function k if it is a vendor, MIDI or printer function. UsbVenId Funct VID << 16 | PID of function k, -1 if UsbVenGen fails. UsbVenIf Funct Interface number of function k, -1 if UsbVenGen fails. UsbVenIsoRead Funct IN stream: the packets of the units done since the last call, oldest first. UsbVenIsoStart Funct Start isochronous endpoint ep of function k. Returns the max packet bytes. UsbVenIsoStat Funct Counters of function k's stream, -1 if none. UsbVenIsoStop Funct Stop function k's isochronous stream, if any. UsbVenIsoWrite Funct OUT stream: queue up to n packets behind the ones still waiting. UsbVenMps Funct Max packet size of function k's bulk IN endpoint, -1 if UsbVenGen fails. UsbVenRst Funct Reset the data toggles of function k's bulk endpoints. UsbVenSpeed Funct Speed of function k's device (USB_SPD_* in Kernel/Usb/Usb.HH). UsbVenXfer Funct Synchronous bulk transfer on function k: IN if dirin, else OUT. UsbVolSerial Funct Volume serial identifying USB stick k, for UsbMountVol(). 0 if it has none. User Funct Create user term task. UserCmdLine Funct A user task ends-up calling this. Yield Funct Yield cpu to next task. adam_task GlbVar CTask *adam_task; blink_master_flag GlbVar I64 blink_master_flag=1; fp_usb_plug GlbVar U0 (*fp_usb_plug)(I64 k, Bool on, I64 kind) = NULL; fp_usb_poll GlbVar U0 (*fp_usb_poll)() = NULL; fps_master GlbVar I64 fps_master=30; last_init_task GlbVar CTask *last_init_task=NULL; scroll_master_flag GlbVar I64 scroll_master_flag=1; seth_gfx_flag GlbVar Unres extern U0 SdSetResetClk(I64 freq); seth_gr_sema GlbVar Unres extern U0 SdSetDma(Bool on); seth_gr_task GlbVar Unres extern sd_drv *SdhciInit(I64 vendor_id=NULL, I64 device_id=NULL, Bool setup_drvs=TRUE); sys_num_spawned_tasksGlbVar I64 sys_num_spawned_tasks; usb_kbd_rep_delay GlbVar I64 usb_kbd_rep_delay = 400, usb_kbd_rep_rate = 35; usb_kbd_rep_rate GlbVar I64 usb_kbd_rep_delay = 400, usb_kbd_rep_rate = 35; winmgr GlbVar #help_file "::/Doc/ScreenSaver"

Task/Delay

Busy Funct Loosely timed. FPSProf Funct Counts real FPS, does not include window manager sleeping FPSProfReset Funct Ensures FPS test not running PortNop Funct Innoculous (reads IRQ Mask) which should take fixed time Refresh Funct Wait for 30fps WinMgr to start & finish scrn refresh. Sleep Funct Not for power-saving. It is to make a program pause without hogging the CPU. SleepUntil Funct Not for power-saving. It is to make a program pause without hogging the CPU.

Task/Job

/* Graphics Not Rendered in HTML */ PopUpPrint User ExePrint PopUp ExePutS Core0 AdamTask SrvCmdLine AP SethTask UserCmdLine SrvTaskCont UserTaskCont JobsHndlr JobRunOne JobRunOne ExeCmdLine ExeCmdLine CJob nodes are one of five types. User applications deal with text or msgs. JobRunOne() will call a function, spawn a task or execute some text src code. #define JOBT_TEXT_INPUT 0 //TaskText() Feed StdIn #define JOBT_MSG 1 //TaskMsg() Post msg #define JOBT_EXE_STR 2 //TaskExe() Compile & execute src code text #define JOBT_CALL 3 //JobQue() Tell MP to call function #define JOBT_SPAWN_TASK 4 //Spawn() Tell MP to spawn task Several other routines include a call to JobsHndlr() that gives them powerful ability to execute servant cmds.

Task/Job/Exe

Adam Funct Make adam_task execute code. AdamErr Funct Display red blinking Err text in adam_task. AdamFile Funct Make adam_task execute file. AdamLog Funct Display text in adam_task. ExeCmdLine Funct Terminal JIT-compile-and-execute loop for CCmpCtrl. JobDel Funct Free one cmd node. JobQue Funct Queue multicore jobs, handled by Seth tasks. JobResGet Funct See ::/Demo/MultiCore/Lock.HC JobResScan Funct Check rqst complete, return with or without. JobsHndlr Funct Handle all waiting cmds and return. PopUp Funct Execute code in PopUp task. PopUpEd Funct Create PopUp win task and edit a doc. PopUpFile Funct ExeFile2() in PopUp task. Cont as User. PopUpPrint Funct Execute code in PopUp task. PopUpRunFile Funct ExeFile() with args using LastFun() in PopUp task. Spawn Funct Create task on core running at address. SrvTaskCont Funct Act as server task in a loop handling commands. TaskExe Funct Queues a request to compile and execute src code text. TaskRstAwaitingMsg Funct Pop-ups get parent messages so wake-up our pop-ups if we got a msg. UserTaskCont Funct Terminal key-input-execute loop.

Task/Job/Text & Msgs

In Funct Send text to own input buffer. See ::/Demo/AcctExample/TOS/TOSDistro.HC. InFile Funct Send InFile code file to self. InStr Funct Send InFile code to self. Msg Funct Post message to current task and return immediately. PostMsg Funct Post message to a task and return immediately. See msg_code. PostMsgWait Funct Post message to a task and wait until task is idle.See msg_code. TaskMsg Funct Post message to servant task. Tell who the master task is. TaskText Funct Post StdIn text to servant task. Tell who the master task is. XTalk Funct Sends text to other task. See ::/Misc/OSTestSuite.HC. XTalkStr Funct Send InFile code to other task. XTalkStrWait Funct Send InFile code to other task and wait for it to idle. XTalkWait Funct Send text to other task and wait for it to idle.

Task/Misc

TSSBusy Funct See ::/Demo/Lectures/Ring3.HC. TaskDerivedValsUpdateFunct Those things calculated from other variables. WinDerivedValsUpdateFunct Those things calculated from other variables.

Task/Settings

CTaskSettings Class class CTaskSettings RestoreWinLoc Funct Restores window position SaveWinLoc Funct Saves window position SettingsPop Funct Typically, called at end of an application. SettingsPush Funct Typically, called at start of an application.