•  Back 
  •  Type definitions 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File14.9.17  THREADINFO                                                TOS

typedef struct
{
   int32_t cdecl (*proc)(void *par);
   void          *user_stack;
   uint32_t      stacksize;
   int16_t       mode;
   int32_t       res1;
} THREADINFO;

Note: If the component user_stack is NULL, then the system will create 
the stack itself. When the thread terminates, the system will release 
the stack again automatically. The component stacksize must always be 
specified so that the system can set the stack pointer of the thread 
to the end of the stack. The supervisior-stack is set by the operating 
system, so that its size cannot be influenced.

The components mode and res1 are reserved for future purposes, so they 
should be set to the value 0 or 0L. In Solaris 2.x, for instance, one 
can arrest the thread up to the final start with them. The started 
thread executes the function proc, which is passed as a parameter to 
the component par (on the stack). The CPU registers d0-d2 and a0-a2 
may be altered by the function.

See also: Threads in MagiC   shel_write   Sample code