This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13182
Change subject: slotmap: Add slotmap_get_id() function to get numeric ID of slot map
......................................................................
slotmap: Add slotmap_get_id() function to get numeric ID of slot map
Change-Id: Ie476244d9ade30eed9215923275aa82a5d10176f
---
M src/slotmap.c
M src/slotmap.h
2 files changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/82/13182/1
diff --git a/src/slotmap.c b/src/slotmap.c
index a8874fb..703dd02 100644
--- a/src/slotmap.c
+++ b/src/slotmap.c
@@ -29,6 +29,10 @@
return buf;
}
+uint32_t slotmap_get_id(const struct slot_mapping *map)
+{
+ return (map->bank.bank_id << 16) | map->bank.slot_nr;
+}
/* thread-safe lookup of map by client:slot */
struct slot_mapping *slotmap_by_client(struct slotmaps *maps, const struct client_slot *client)
diff --git a/src/slotmap.h b/src/slotmap.h
index 5d3d891..a26de6d 100644
--- a/src/slotmap.h
+++ b/src/slotmap.h
@@ -68,6 +68,8 @@
pthread_rwlock_t rwlock;
};
+uint32_t slotmap_get_id(const struct slot_mapping *map);
+
/* thread-safe lookup of map by client:slot */
struct slot_mapping *slotmap_by_client(struct slotmaps *maps, const struct client_slot *client);
--
To view, visit https://gerrit.osmocom.org/13182
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie476244d9ade30eed9215923275aa82a5d10176f
Gerrit-Change-Number: 13182
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190307/7193534d/attachment.htm>