mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-22 14:46:27 +00:00
ipc: Word choice/clarity
This commit is contained in:
parent
6706180cd8
commit
7f600569e7
src/xrt/ipc
android/src/main/java/org/freedesktop/monado/ipc
client
server
shared
|
@ -293,7 +293,7 @@ public class Client implements ServiceConnection {
|
||||||
/**
|
/**
|
||||||
* Handle the asynchronous connection of the binder IPC.
|
* 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.
|
* @param service the associated service, which we cast in this function.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -309,13 +309,13 @@ public class Client implements ServiceConnection {
|
||||||
/**
|
/**
|
||||||
* Handle asynchronous disconnect.
|
* Handle asynchronous disconnect.
|
||||||
*
|
*
|
||||||
* @param name should match the intent above, but not used.
|
* @param name should match the preceding intent, but not used.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onServiceDisconnected(ComponentName name) {
|
public void onServiceDisconnected(ComponentName name) {
|
||||||
Log.i(TAG, "onServiceDisconnected");
|
Log.i(TAG, "onServiceDisconnected");
|
||||||
shutdown();
|
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.
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -528,7 +528,7 @@ ipc_compositor_wait_frame(struct xrt_compositor *xc,
|
||||||
// This is how much we should sleep.
|
// This is how much we should sleep.
|
||||||
uint64_t diff_ns = wake_up_time_ns - now_ns;
|
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;
|
diff_ns -= measured_scheduler_latency_ns;
|
||||||
|
|
||||||
os_nanosleep(diff_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) {
|
if (image_count < in_image_count) {
|
||||||
for (uint32_t k = 0; k < image_count && k < in_image_count; k++) {
|
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.
|
* ipc_call_swapchain_create will be -1.
|
||||||
*/
|
*/
|
||||||
if (remote_fds[k] >= 0) {
|
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.
|
// Close any fds we are not interested in.
|
||||||
for (; i < image_count; i++) {
|
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.
|
* ipc_call_swapchain_create will be -1.
|
||||||
*/
|
*/
|
||||||
if (remote_fds[i] >= 0) {
|
if (remote_fds[i] >= 0) {
|
||||||
|
|
|
@ -788,11 +788,10 @@ ipc_handle_swapchain_create(volatile struct ipc_client_state *ics,
|
||||||
// return our result to the caller.
|
// return our result to the caller.
|
||||||
struct xrt_swapchain_native *xscn = (struct xrt_swapchain_native *)xsc;
|
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 <= IPC_MAX_SWAPCHAIN_HANDLES);
|
||||||
assert(xsc->image_count <= max_handle_capacity);
|
assert(xsc->image_count <= max_handle_capacity);
|
||||||
|
|
||||||
// Paranoia.
|
|
||||||
for (size_t i = 1; i < xsc->image_count; i++) {
|
for (size_t i = 1; i < xsc->image_count; i++) {
|
||||||
assert(xscn->images[0].size == xscn->images[i].size);
|
assert(xscn->images[0].size == xscn->images[i].size);
|
||||||
assert(xscn->images[0].use_dedicated_allocation == xscn->images[i].use_dedicated_allocation);
|
assert(xscn->images[0].use_dedicated_allocation == xscn->images[i].use_dedicated_allocation);
|
||||||
|
|
|
@ -233,8 +233,7 @@ init_shm(struct ipc_server *s)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we have a filehandle, we will pass this to
|
// we have a filehandle, we will pass this to our client
|
||||||
// our client rather than access via filesystem
|
|
||||||
s->ism_handle = handle;
|
s->ism_handle = handle;
|
||||||
|
|
||||||
|
|
||||||
|
@ -256,7 +255,7 @@ init_shm(struct ipc_server *s)
|
||||||
}
|
}
|
||||||
|
|
||||||
// The position of the tracking origin matches that in the
|
// The position of the tracking origin matches that in the
|
||||||
// servers memory.
|
// server's memory.
|
||||||
assert(i < XRT_SYSTEM_MAX_DEVICES);
|
assert(i < XRT_SYSTEM_MAX_DEVICES);
|
||||||
|
|
||||||
struct ipc_shared_tracking_origin *itrack = &ism->itracks[count++];
|
struct ipc_shared_tracking_origin *itrack = &ism->itracks[count++];
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#define IPC_BUF_SIZE 512 // must be >= largest message length in bytes
|
#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_VIEWS 8 // max views we will return configs for
|
||||||
#define IPC_MAX_FORMATS 32 // max formats our server-side compositor supports
|
#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_LAYERS 16
|
||||||
#define IPC_MAX_SLOTS 128
|
#define IPC_MAX_SLOTS 128
|
||||||
#define IPC_MAX_CLIENTS 8
|
#define IPC_MAX_CLIENTS 8
|
||||||
|
|
Loading…
Reference in a new issue