typedef struct listNode
{
struct listNode *next;
- uintptr_t id; // random value
+ uint32_t id; // random value
uint32_t last_access; // System Time in second
TEE_OperationHandle oper;
uint32_t tag_len_bits;
#define MAX_CTX_TIMEOUT 600 // 10 minutes
-listNode *ctxl_read_node_id(uintptr_t id);
+listNode *ctxl_read_node_id(uint32_t id);
listNode *ctxl_add_last_node(TEE_OperationHandle oper, uint32_t tag_len_bits);
-void ctxl_delete_node_id(uintptr_t id);
+void ctxl_delete_node_id(uint32_t id);
+#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
return (prev);
}
-listNode *ctxl_read_node_id(uintptr_t id)
+listNode *ctxl_read_node_id(uint32_t id)
{
listNode *cur;
cur = head.next; // skip head node
end = find_end_remove_expired();
listNode *newNode;
newNode = (listNode *) TEE_Malloc(sizeof(listNode), 0);
- newNode->id = (uintptr_t) oper; // Use the pointer of operation.
+ newNode->id = (uint32_t)((ptrdiff_t)oper); // Use the pointer of operation.
newNode->oper = oper;
newNode->tag_len_bits = tag_len_bits;
newNode->next = NULL;
return (newNode);
}
-void ctxl_delete_node_id(uintptr_t id)
+void ctxl_delete_node_id(uint32_t id)
{
listNode *prev, *cur;