}
static inline void
-claim_slot(VCHIQ_SLOT_INFO_T *slot)
+claim_slot(struct vchiq_slot_info *slot)
{
slot->use_count++;
}
static void
-release_slot(VCHIQ_STATE_T *state, VCHIQ_SLOT_INFO_T *slot_info,
+release_slot(VCHIQ_STATE_T *state, struct vchiq_slot_info *slot_info,
struct vchiq_header *header, struct vchiq_service *service)
{
int release_count;
}
for (i = state->remote->slot_first; i <= slot_last; i++) {
- VCHIQ_SLOT_INFO_T *slot_info =
+ struct vchiq_slot_info *slot_info =
SLOT_INFO_FROM_INDEX(state, i);
if (slot_info->release_count != slot_info->use_count) {
char *data =
int msgid = header->msgid;
if (msgid & VCHIQ_MSGID_CLAIMED) {
- VCHIQ_SLOT_INFO_T *slot_info =
+ struct vchiq_slot_info *slot_info =
SLOT_INFO_FROM_INDEX(state, slot_index);
release_slot(state, slot_info, header, service);
vchiq_dump(dump_context, buf, len + 1);
for (i = shared->slot_first; i <= shared->slot_last; i++) {
- VCHIQ_SLOT_INFO_T slot_info = *SLOT_INFO_FROM_INDEX(state, i);
+ struct vchiq_slot_info slot_info =
+ *SLOT_INFO_FROM_INDEX(state, i);
if (slot_info.use_count != slot_info.release_count) {
len = snprintf(buf, sizeof(buf),
" %d: %d/%d", i, slot_info.use_count,
char data[VCHIQ_SLOT_SIZE];
} VCHIQ_SLOT_T;
-typedef struct vchiq_slot_info_struct {
+struct vchiq_slot_info {
/* Use two counters rather than one to avoid the need for a mutex. */
short use_count;
short release_count;
-} VCHIQ_SLOT_INFO_T;
+};
struct vchiq_service {
struct vchiq_service_base base;
int platform_data[2];
struct vchiq_shared_state master;
struct vchiq_shared_state slave;
- VCHIQ_SLOT_INFO_T slots[VCHIQ_MAX_SLOTS];
+ struct vchiq_slot_info slots[VCHIQ_MAX_SLOTS];
} VCHIQ_SLOT_ZERO_T;
struct vchiq_state_struct {
char *tx_data;
char *rx_data;
- VCHIQ_SLOT_INFO_T *rx_info;
+ struct vchiq_slot_info *rx_info;
struct mutex slot_mutex;
struct vchiq_service *services[VCHIQ_MAX_SERVICES];
struct vchiq_service_quota service_quotas[VCHIQ_MAX_SERVICES];
- VCHIQ_SLOT_INFO_T slot_info[VCHIQ_MAX_SLOTS];
+ struct vchiq_slot_info slot_info[VCHIQ_MAX_SLOTS];
VCHIQ_PLATFORM_STATE_T platform_state;
};