summaryrefslogtreecommitdiff
path: root/lwis_transaction.h
diff options
context:
space:
mode:
authorGe Bian <bian@google.com>2022-05-24 23:31:51 -0700
committerGe Bian <bian@google.com>2022-05-26 20:45:46 -0700
commit4534d6f0ea2476f034883d4c51751309422328c7 (patch)
tree1f2b0a340b3ffd04d954404c3ddee159c73df1da /lwis_transaction.h
parentce6dc2cdc6eaa0b06fb597b9d6cd092b6f0592c9 (diff)
downloadlwis-4534d6f0ea2476f034883d4c51751309422328c7.tar.gz
LWIS: Add a pending transaction map to lwis_client.
This pending transaction map will be useful for handling OR{} trigger conditions. It can be used to look up if a transaction is still waiting to be triggered. Bug: 229024993 Test: unit test Change-Id: I0651fa4b6876d4ba7984a0f64eb5aff81c6d6b70
Diffstat (limited to 'lwis_transaction.h')
-rw-r--r--lwis_transaction.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lwis_transaction.h b/lwis_transaction.h
index 8b645b0..df15dfe 100644
--- a/lwis_transaction.h
+++ b/lwis_transaction.h
@@ -29,6 +29,7 @@ struct lwis_transaction {
struct lwis_transaction_response_header *resp;
struct list_head event_list_node;
struct list_head process_queue_node;
+ struct hlist_node pending_map_node;
};
/* For debugging purposes, keeps track of the transaction information, as
@@ -46,6 +47,11 @@ struct lwis_transaction_event_list {
struct hlist_node node;
};
+struct lwis_pending_transaction_id {
+ int64_t id;
+ struct list_head list_node;
+};
+
int lwis_transaction_init(struct lwis_client *client);
int lwis_transaction_clear(struct lwis_client *client);
int lwis_transaction_client_flush(struct lwis_client *client);