Page MenuHomeFreeBSD

D26177.1775611114.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D26177.1775611114.diff

Index: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h
===================================================================
--- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h
+++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h
@@ -141,17 +141,17 @@
#define VCHIQ_BULK_ACTUAL_ABORTED -1
-typedef uint32_t BITSET_T;
+typedef uint32_t VCHI_BITSET_T;
-vchiq_static_assert((sizeof(BITSET_T) * 8) == 32);
+vchiq_static_assert((sizeof(VCHI_BITSET_T) * 8) == 32);
-#define BITSET_SIZE(b) ((b + 31) >> 5)
-#define BITSET_WORD(b) (b >> 5)
-#define BITSET_BIT(b) (1 << (b & 31))
-#define BITSET_ZERO(bs) memset(bs, 0, sizeof(bs))
-#define BITSET_IS_SET(bs, b) (bs[BITSET_WORD(b)] & BITSET_BIT(b))
-#define BITSET_SET(bs, b) (bs[BITSET_WORD(b)] |= BITSET_BIT(b))
-#define BITSET_CLR(bs, b) (bs[BITSET_WORD(b)] &= ~BITSET_BIT(b))
+#define VCHI_BITSET_SIZE(b) ((b + 31) >> 5)
+#define VCHI_BITSET_WORD(b) (b >> 5)
+#define VCHI_BITSET_BIT(b) (1 << (b & 31))
+#define VCHI_BITSET_ZERO(bs) memset(bs, 0, sizeof(bs))
+#define VCHI_BITSET_IS_SET(bs, b) (bs[VCHI_BITSET_WORD(b)] & VCHI_BITSET_BIT(b))
+#define VCHI_BITSET_SET(bs, b) (bs[VCHI_BITSET_WORD(b)] |= VCHI_BITSET_BIT(b))
+#define VCHI_BITSET_CLR(bs, b) (bs[VCHI_BITSET_WORD(b)] &= ~VCHI_BITSET_BIT(b))
#if VCHIQ_ENABLE_STATS
#define VCHIQ_STATS_INC(state, stat) (state->stats. stat++)
@@ -478,7 +478,7 @@
unsigned short data_quota;
/* An array of bit sets indicating which services must be polled. */
- atomic_t poll_services[BITSET_SIZE(VCHIQ_MAX_SERVICES)];
+ atomic_t poll_services[VCHI_BITSET_SIZE(VCHIQ_MAX_SERVICES)];
/* The number of the first unused service */
int unused_service;
Index: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c
===================================================================
--- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c
+++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c
@@ -619,7 +619,7 @@
process_free_queue(VCHIQ_STATE_T *state)
{
VCHIQ_SHARED_STATE_T *local = state->local;
- BITSET_T service_found[BITSET_SIZE(VCHIQ_MAX_SERVICES)];
+ VCHI_BITSET_T service_found[VCHI_BITSET_SIZE(VCHIQ_MAX_SERVICES)];
int slot_queue_available;
/* Find slots which have been freed by the other side, and return them
@@ -646,7 +646,7 @@
/* Initialise the bitmask for services which have used this
** slot */
- BITSET_ZERO(service_found);
+ VCHI_BITSET_ZERO(service_found);
pos = 0;
@@ -686,9 +686,9 @@
header->size);
WARN(1, "invalid message use count\n");
}
- if (!BITSET_IS_SET(service_found, port)) {
+ if (!VCHI_BITSET_IS_SET(service_found, port)) {
/* Set the found bit for this service */
- BITSET_SET(service_found, port);
+ VCHI_BITSET_SET(service_found, port);
spin_lock(&quota_spinlock);
count = service_quota->slot_use_count;
@@ -1276,7 +1276,7 @@
{
int group, i;
- for (group = 0; group < BITSET_SIZE(state->unused_service); group++) {
+ for (group = 0; group < VCHI_BITSET_SIZE(state->unused_service); group++) {
uint32_t flags;
flags = atomic_xchg(&state->poll_services[group], 0);
for (i = 0; flags; i++) {

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 8, 1:18 AM (10 h, 4 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28297130
Default Alt Text
D26177.1775611114.diff (3 KB)

Event Timeline