-   
 
 cre_cyc
 acre_cyc
 
-   
 
 ER      cre_cyc (ID cycid, T_CCYC *pk_ccyc );
 ER_ID   acre_cyc ( T_CCYC *pk_ccyc );
 
| 
 | 
 | 
 | 
| 
 | 
 ID      cycid;
 
 | 
 ID number of the cyclic handler.
  
 | 
| 
 | 
 T_CCYC  *pk_ccyc;
 
 | 
 Pointer to the packet containing the cyclic handler creation information.
  
 | 
 
 [Cyclic handler creation information packet : T_CCYC]
 
 
 typedef struct  t_ccyc {
     ATR     cycatr;         /*Cyclic handler attribute*/
     VP_INT  exinf;          /*Extended information*/
     FP      cychdr;         /*Cyclic handler start address*/
     RELTIM  cyctim;         /*Activation cycle (in milli-second)*/
     UINT    cycphs;         /*Activation phase (in milli-second)*/
 } T_CCYC;
 
 | 
 
 This service call can be called from tasks that belong to 
Trusted Domain.
 
 The cre_cyc creates a cyclic handler with cyclic handler ID indicated by 
cycid according to the content of 
pk_ccyc. The acre_cyc creates a cyclic handler according to the content of 
pk_ccyc, and returns the created cyclic handler ID.
 
 1 )	 Cyclic handler attribute (
cycatr)
The following are specified for 
cycatr.
 
   cycatr := ( TA_HLMG | [ TA_STA ] | [ TA_PHS ] )
 -	 
TA_HLNG ( = 0x0000)
Only C-language is supported for cyclic handler description language.
 
 -	 
TA_STA ( = 0x0002)
When TA_STA is specified, the cyclic handler is in operational state (STA state). When TA_STA is not specified, the cyclic handler is in non-operational state (STP state).
 
 -	 
TA_PHS ( = 0x0004)
When TA_PHS is specified, the next activation time is determined preserving the activation phase when the cyclic handler is moved to operational state. When TA_PHS is not specified, the cyclic handler is activated cyctim milliseconds after issuing 
sta_cyc or 
ista_cyc.
Please refer to "
10.6.5  Start cyclic handler operation".
 
 2 )	 Extended information (
exinf)
The 
exinf is passed to the cyclic handler as argument.  The 
exinf can be widely used by the user, for example, to set information concerning the cyclic handler.
 
 3 )	 Cyclic handler start address (
cychdr)
Specify the cyclic handler start address for 
cychdr.
 
 4 )	 Activation cycle (
cyctim), activation phase (
cycphs)
Specify activation cycle (in milli-second) for 
cyctim.
And specify the time to the first staring from this service call (in milli-second) for 
cycphs. When both TA_STA and TA_PHS are not specified, the 
cycphs is ignored.
 
 
| 
 | 
 | 
 | 
| 
 | 
 | 
 Normal completion of acre_cyc. (Created cyclic handler ID)
  
 | 
| 
 | 
 | 
 Normal completion of cre_cyc.
  
 | 
| 
 | 
 | 
 -	 Either of bits in  cycatr except bit1 and bit2 is 1.
  
 | 
| 
 | 
 | 
 | 
| 
 | 
 | 
 Invalid ID number. (only for cre_cyc)
  
 | 
| 
 | 
 | 
 -	 This service call was issued in the CPU locked state.
  
 -	 This service call was issued from non-task.
  
 -	 This service call was issued in the status "PSW.IPL > kernel interrupt mask level".
  
 | 
| 
 | 
 | 
 -	 Stack pointer points out of user stack for invoking task.
  
 -	 The operand-read access to the area indicated by  pk_ccyc has not been permitted to the invoking task.
  
 | 
| 
 | 
 | 
 -	 The invoking task does not belong to trusted domain.
  
 | 
| 
 | 
 | 
 No ID number available.(only for acre_cyc)
  
 | 
| 
 | 
 | 
 Object state error. (only for cre_cyc)
  
 -	 The cyclic handler specified by  cycid exists.
  
 |