a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 exec.library
  AVL_AddNode
  AVL_FindFirstNode
  AVL_FindLastNode
  AVL_FindNextNodeByAddress
  AVL_FindNextNodeByKey
  AVL_FindNode
  AVL_FindPrevNodeByAddress
  AVL_FindPrevNodeByKey
  AVL_RemNodeByAddress
  AVL_RemNodeByKey
  AbortIO
  AddDevice
  AddHead
  AddIntServer
  AddLibrary
  AddMemHandler
  AddMemList
  AddPort
  AddResource
  AddSemaphore
  AddTail
  AddTask
  Alert
  AllocAbs
  AllocEntry
  AllocMem
  AllocPooled
  AllocSignal
  AllocTrap
  AllocVec
  Allocate
  AttemptSemaphore
  AttemptSemaphoreShared
  AvailMem
  CacheClearE
  CacheClearU
  CacheControl
  CachePostDMA
  CachePreDMA
  Cause
  CheckIO
  CloseDevice
  CloseLibrary
  ColdReboot
  CopyMem
  CopyMemQuick
  CreateIORequest
  CreateMsgPort
  CreatePool
  Deallocate
  Debug
  DeleteIORequest
  DeleteMsgPort
  DeletePool
  Disable
  DoIO
  Enable
  Enqueue
  FindName
  FindPort
  FindResident
  FindSemaphore
  FindTask
  Forbid
  FreeEntry
  FreeMem
  FreePooled
  FreeSignal
  FreeTrap
  FreeVec
  GetCC
  GetMsg
  InitCode
  InitResident
  InitSemaphore
  InitStruct
  Insert
  MakeFunctions
  MakeLibrary
  ObtainQuickVector
  ObtainSemaphore
  ObtainSemaphoreList
  ObtainSemaphoreShared
  OldOpenLibrary
  OpenDevice
  OpenLibrary
  OpenResource
  Permit
  Procure
  PutMsg
  RawDoFmt
  ReleaseSemaphore
  ReleaseSemaphoreList
  RemDevice
  RemHead
  RemIntServer
  RemLibrary
  RemMemHandler
  RemPort
  RemResource
  RemSemaphore
  RemTail
  RemTask
  Remove
  ReplyMsg
  SendIO
  SetExcept
  SetFunction
  SetIntVector
  SetSR
  SetSignal
  SetTaskPri
  Signal
  StackSwap
  SumKickData
  SumLibrary
  SuperState
  Supervisor
  TypeOfMem
  UserState
  Vacate
  Wait
  WaitIO
  WaitPort
Include
GuruMeditation
Docs » Autodocs » exec.library » Forbid

NAME

	Forbid -- forbid task rescheduling.

SYNOPSIS

	Forbid()
void Forbid(void);

FUNCTION

	Prevents other tasks from being scheduled to run by the dispatcher,
until a matching Permit() is executed, or this task is scheduled to
Wait(). Interrupts are NOT disabled.
DO NOT USE THIS CALL WITHOUT GOOD JUSTIFICATION. THIS CALL IS
DANGEROUS!

RESULT

	The current task will not be rescheduled as long as it is ready to
run. In the event that the current task enters a wait state, other
tasks may be scheduled. Upon return from the wait state, the original
task will continue to run without disturbing the Forbid().
Calls to Forbid() nest. In order to restore normal task rescheduling,
the programmer must execute exactly one call to Permit() for every
call to Forbid().

WARNING

	In the event of a task entering a Wait() after a Forbid(), the system
"breaks" the forbidden state and runs normally until the task which
called Forbid() is rescheduled. If caution is not taken, this can
cause subtle bugs, since any device or DOS call will (in effect)
cause your task to wait.
Forbid() is not useful or safe from within interrupt code
(All interrupts are always higher priority than tasks, and
interrupts are allowed to break a Forbid()).

NOTES

	This call is guaranteed to preserve all registers.

SEE ALSO

Permit(), Disable(), ObtainSemaphore(), ObtainSemaphoreShared()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Abyss

CSL
ANA
HZ
AYS

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se