Everything

cre_alm

acre_alm

Outline
Create alarm handler.
C format
 ER      cre_alm (ID almid, T_CALM *pk_calm );
 ER_ID   acre_alm ( T_CALM *pk_calm );
Parameter(s)
I/O
Parameter
Description
I
 ID      almid;
ID number of the alarm handler.
I
 T_CALM  *pk_calm;
Pointer to the packet containing the alarm handler creation information.

[Alarm handler creation information packet : T_CALM]
 typedef struct  t_calm {
     ATR     almatr;         /*Alarm handler attribute*/
     VP_INT  exinf;          /*Extended information*/
     FP      almhdr;         /*Alarm handler start address*/
 } T_CALM;

Explanation
This service call can be called from tasks that belong to Trusted Domain.
The cre_alm creates a alarm handler with alarm handler ID indicated by almid according to the content of pk_calm. The acre_alm creates a alarm handler according to the content of pk_calm, and returns the created alarm handler ID.
1 ) Alarm handler attribute (almatr)
Only TA_HLNG can be specified for almatr.
- TA_HLNG ( = 0x0000)
Only C-language is supported for alarm handler description language.
2 ) Extended information (exinf)
The exinf is passed to the alarm handler as argument. The exinf can be widely used by the user, for example, to set information concerning the alarm handler.
3 ) Alarm handler start address (almhdr)
Specify the alarm handler start address for almhdr.
Return value
Macro
Value
Description
-
Positive value
Normal completion of acre_alm. (Created alarm handler ID)
E_OK
0
Normal completion of cre_alm.
E_RSATR
-11
Reserved attribute
- almatr != TA_HLNG
E_PAR
-17
Parameter error.
- pk_calm == NULL
- almhdr == NULL
E_ID
-18
Invalid ID number. (only for cre_alm)
- almid < 0
- almid > VTMAX_ALH
E_CTX
-25
Context error.
- 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".
E_MACV
-26
Memory access violation.
- Stack pointer points out of user stack for invoking task.
- The operand-read access to the area indicated by pk_calm has not been permitted to the invoking task.
E_OACV
-27
Object access violation.
- The invoking task does not belong to trusted domain.
E_NOID
-34
No ID number available.(only for acre_alm)
E_OBJ
-41
Object state error. (only for cre_alm)
- The alarm handler specified by almid exists.