ipc: Word choice/clarity

This commit is contained in:
Ryan Pavlik 2022-05-17 15:28:37 -05:00
parent 6706180cd8
commit 7f600569e7
5 changed files with 10 additions and 12 deletions
src/xrt/ipc
android/src/main/java/org/freedesktop/monado/ipc
client
server
shared

View file

@ -293,7 +293,7 @@ public class Client implements ServiceConnection {
/**
* Handle the asynchronous connection of the binder IPC.
*
* @param name should match the intent above, but not used.
* @param name should match the preceding intent, but not used.
* @param service the associated service, which we cast in this function.
*/
@Override
@ -309,13 +309,13 @@ public class Client implements ServiceConnection {
/**
* Handle asynchronous disconnect.
*
* @param name should match the intent above, but not used.
* @param name should match the preceding intent, but not used.
*/
@Override
public void onServiceDisconnected(ComponentName name) {
Log.i(TAG, "onServiceDisconnected");
shutdown();
//! @todo tell native that the world is crumbling, then close the fd here.
//! @todo tell C/C++ that the world is crumbling, then close the fd here.
}
/*

View file

@ -528,7 +528,7 @@ ipc_compositor_wait_frame(struct xrt_compositor *xc,
// This is how much we should sleep.
uint64_t diff_ns = wake_up_time_ns - now_ns;
// A minor tweak that helps hit the time better.
// A minor tweak that helps achieve the timing better.
diff_ns -= measured_scheduler_latency_ns;
os_nanosleep(diff_ns);
@ -886,7 +886,7 @@ ipc_compositor_images_allocate(struct xrt_image_native_allocator *xina,
if (image_count < in_image_count) {
for (uint32_t k = 0; k < image_count && k < in_image_count; k++) {
/*
* Paranoia, we do know that any fd not touched by
* Overly-broad condition: we know that any fd not touched by
* ipc_call_swapchain_create will be -1.
*/
if (remote_fds[k] >= 0) {
@ -908,7 +908,7 @@ ipc_compositor_images_allocate(struct xrt_image_native_allocator *xina,
// Close any fds we are not interested in.
for (; i < image_count; i++) {
/*
* Paranoia, we do know that any fd not touched by
* Overly-broad condition: we know that any fd not touched by
* ipc_call_swapchain_create will be -1.
*/
if (remote_fds[i] >= 0) {

View file

@ -788,11 +788,10 @@ ipc_handle_swapchain_create(volatile struct ipc_client_state *ics,
// return our result to the caller.
struct xrt_swapchain_native *xscn = (struct xrt_swapchain_native *)xsc;
// Sanity checking.
// Limit checking
assert(xsc->image_count <= IPC_MAX_SWAPCHAIN_HANDLES);
assert(xsc->image_count <= max_handle_capacity);
// Paranoia.
for (size_t i = 1; i < xsc->image_count; i++) {
assert(xscn->images[0].size == xscn->images[i].size);
assert(xscn->images[0].use_dedicated_allocation == xscn->images[i].use_dedicated_allocation);

View file

@ -233,8 +233,7 @@ init_shm(struct ipc_server *s)
return -1;
}
// we have a filehandle, we will pass this to
// our client rather than access via filesystem
// we have a filehandle, we will pass this to our client
s->ism_handle = handle;
@ -256,7 +255,7 @@ init_shm(struct ipc_server *s)
}
// The position of the tracking origin matches that in the
// servers memory.
// server's memory.
assert(i < XRT_SYSTEM_MAX_DEVICES);
struct ipc_shared_tracking_origin *itrack = &ism->itracks[count++];

View file

@ -27,7 +27,7 @@
#define IPC_BUF_SIZE 512 // must be >= largest message length in bytes
#define IPC_MAX_VIEWS 8 // max views we will return configs for
#define IPC_MAX_FORMATS 32 // max formats our server-side compositor supports
#define IPC_MAX_DEVICES 8 // max number of devices we will map via shared mem
#define IPC_MAX_DEVICES 8 // max number of devices we will map using shared mem
#define IPC_MAX_LAYERS 16
#define IPC_MAX_SLOTS 128
#define IPC_MAX_CLIENTS 8