Skip to content

Commit

Permalink
vchiq: Synchronisation primitive comments
Browse files Browse the repository at this point in the history
Add a few comments on the usage of synchronisation primitives.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
  • Loading branch information
pelwell committed May 7, 2024
1 parent f7c242e commit f55abd4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#define KEEPALIVE_VER 1
#define KEEPALIVE_VER_MIN KEEPALIVE_VER

DEFINE_SPINLOCK(msg_queue_spinlock); /* FIXME */
DEFINE_SPINLOCK(msg_queue_spinlock); /* serialise access to the message queues to userspace */
struct vchiq_state g_state;

static struct platform_device *bcm2835_camera;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ static inline void check_sizes(void)
BUILD_BUG_ON_NOT_POWER_OF_2(VCHIQ_MAX_SERVICES);
}

DEFINE_SPINLOCK(bulk_waiter_spinlock); /* FIXME */
static DEFINE_SPINLOCK(quota_spinlock); /* FIXME */
DEFINE_SPINLOCK(bulk_waiter_spinlock); /* serialiase completion of blocking transfers */
static DEFINE_SPINLOCK(quota_spinlock); /* serialise updates to slot quota data */

static unsigned int handle_seq;

Expand Down
12 changes: 6 additions & 6 deletions drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ struct vchiq_service {

struct completion remove_event;
struct completion bulk_remove_event;
struct mutex bulk_mutex; /* FIXME */
struct mutex bulk_mutex; /* serialise access to the bulk transfer queues */

struct service_stats_struct {
int quota_stalls;
Expand Down Expand Up @@ -312,7 +312,7 @@ struct vchiq_state {
struct completion connect;

/* Mutex protecting services */
struct mutex mutex; /* FIXME */
struct mutex mutex; /* serialise service creation */
struct vchiq_instance **instance;

/* Processes incoming messages */
Expand Down Expand Up @@ -340,13 +340,13 @@ struct vchiq_state {
char *rx_data;
struct vchiq_slot_info *rx_info;

struct mutex slot_mutex; /* FIXME */
struct mutex slot_mutex; /* serialise access to the main message slots */

struct mutex recycle_mutex; /* FIXME */
struct mutex recycle_mutex; /* serialise slot refcount updates */

struct mutex sync_mutex; /* FIXME */
struct mutex sync_mutex; /* serialise access to the single synchronous message slot */

struct mutex bulk_transfer_mutex; /* FIXME */
struct mutex bulk_transfer_mutex; /* Unused, following upstream changes */

/*
* Indicates the byte position within the stream from where the next
Expand Down

0 comments on commit f55abd4

Please sign in to comment.