The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

xrt/space: use int64_t to represent timestamps

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2298>

authored by

Simon Zeni and committed by
Rylie Pavlik
d67ab784 af5cf402

+22 -22
+7 -7
src/xrt/auxiliary/util/u_space_overseer.c
··· 312 312 * order. 313 313 */ 314 314 static void 315 - push_then_traverse(struct xrt_relation_chain *xrc, struct u_space *space, uint64_t at_timestamp_ns) 315 + push_then_traverse(struct xrt_relation_chain *xrc, struct u_space *space, int64_t at_timestamp_ns) 316 316 { 317 317 switch (space->type) { 318 318 case U_SPACE_TYPE_NULL: break; // No-op ··· 340 340 * the reversed order. 341 341 */ 342 342 static void 343 - traverse_then_push_inverse(struct xrt_relation_chain *xrc, struct u_space *space, uint64_t at_timestamp_ns) 343 + traverse_then_push_inverse(struct xrt_relation_chain *xrc, struct u_space *space, int64_t at_timestamp_ns) 344 344 { 345 345 // Done traversing. 346 346 switch (space->type) { ··· 374 374 struct xrt_relation_chain *xrc, 375 375 struct u_space *base, 376 376 struct u_space *target, 377 - uint64_t at_timestamp_ns) 377 + int64_t at_timestamp_ns) 378 378 { 379 379 assert(xrc != NULL); 380 380 assert(base != NULL); ··· 389 389 struct xrt_relation_chain *xrc, 390 390 struct u_space *base, 391 391 struct u_space *target, 392 - uint64_t at_timestamp_ns) 392 + int64_t at_timestamp_ns) 393 393 { 394 394 pthread_rwlock_rdlock(&uso->lock); 395 395 build_relation_chain_read_locked(uso, xrc, base, target, at_timestamp_ns); ··· 531 531 locate_space(struct xrt_space_overseer *xso, 532 532 struct xrt_space *base_space, 533 533 const struct xrt_pose *base_offset, 534 - uint64_t at_timestamp_ns, 534 + int64_t at_timestamp_ns, 535 535 struct xrt_space *space, 536 536 const struct xrt_pose *offset, 537 537 struct xrt_space_relation *out_relation) ··· 587 587 locate_spaces(struct xrt_space_overseer *xso, 588 588 struct xrt_space *base_space, 589 589 const struct xrt_pose *base_offset, 590 - uint64_t at_timestamp_ns, 590 + int64_t at_timestamp_ns, 591 591 struct xrt_space **spaces, 592 592 uint32_t space_count, 593 593 const struct xrt_pose *offsets, ··· 637 637 locate_device(struct xrt_space_overseer *xso, 638 638 struct xrt_space *base_space, 639 639 const struct xrt_pose *base_offset, 640 - uint64_t at_timestamp_ns, 640 + int64_t at_timestamp_ns, 641 641 struct xrt_device *xdev, 642 642 struct xrt_space_relation *out_relation) 643 643 {
+6 -6
src/xrt/include/xrt/xrt_space.h
··· 158 158 xrt_result_t (*locate_space)(struct xrt_space_overseer *xso, 159 159 struct xrt_space *base_space, 160 160 const struct xrt_pose *base_offset, 161 - uint64_t at_timestamp_ns, 161 + int64_t at_timestamp_ns, 162 162 struct xrt_space *space, 163 163 const struct xrt_pose *offset, 164 164 struct xrt_space_relation *out_relation); ··· 180 180 xrt_result_t (*locate_spaces)(struct xrt_space_overseer *xso, 181 181 struct xrt_space *base_space, 182 182 const struct xrt_pose *base_offset, 183 - uint64_t at_timestamp_ns, 183 + int64_t at_timestamp_ns, 184 184 struct xrt_space **spaces, 185 185 uint32_t space_count, 186 186 const struct xrt_pose *offsets, ··· 205 205 xrt_result_t (*locate_device)(struct xrt_space_overseer *xso, 206 206 struct xrt_space *base_space, 207 207 const struct xrt_pose *base_offset, 208 - uint64_t at_timestamp_ns, 208 + int64_t at_timestamp_ns, 209 209 struct xrt_device *xdev, 210 210 struct xrt_space_relation *out_relation); 211 211 ··· 349 349 xrt_space_overseer_locate_space(struct xrt_space_overseer *xso, 350 350 struct xrt_space *base_space, 351 351 const struct xrt_pose *base_offset, 352 - uint64_t at_timestamp_ns, 352 + int64_t at_timestamp_ns, 353 353 struct xrt_space *space, 354 354 const struct xrt_pose *offset, 355 355 struct xrt_space_relation *out_relation) ··· 368 368 xrt_space_overseer_locate_spaces(struct xrt_space_overseer *xso, 369 369 struct xrt_space *base_space, 370 370 const struct xrt_pose *base_offset, 371 - uint64_t at_timestamp_ns, 371 + int64_t at_timestamp_ns, 372 372 struct xrt_space **spaces, 373 373 uint32_t space_count, 374 374 const struct xrt_pose *offsets, ··· 389 389 xrt_space_overseer_locate_device(struct xrt_space_overseer *xso, 390 390 struct xrt_space *base_space, 391 391 const struct xrt_pose *base_offset, 392 - uint64_t at_timestamp_ns, 392 + int64_t at_timestamp_ns, 393 393 struct xrt_device *xdev, 394 394 struct xrt_space_relation *out_relation) 395 395 {
+3 -3
src/xrt/ipc/client/ipc_client_space_overseer.c
··· 131 131 locate_space(struct xrt_space_overseer *xso, 132 132 struct xrt_space *base_space, 133 133 const struct xrt_pose *base_offset, 134 - uint64_t at_timestamp_ns, 134 + int64_t at_timestamp_ns, 135 135 struct xrt_space *space, 136 136 const struct xrt_pose *offset, 137 137 struct xrt_space_relation *out_relation) ··· 157 157 locate_spaces(struct xrt_space_overseer *xso, 158 158 struct xrt_space *base_space, 159 159 const struct xrt_pose *base_offset, 160 - uint64_t at_timestamp_ns, 160 + int64_t at_timestamp_ns, 161 161 struct xrt_space **spaces, 162 162 uint32_t space_count, 163 163 const struct xrt_pose *offsets, ··· 218 218 locate_device(struct xrt_space_overseer *xso, 219 219 struct xrt_space *base_space, 220 220 const struct xrt_pose *base_offset, 221 - uint64_t at_timestamp_ns, 221 + int64_t at_timestamp_ns, 222 222 struct xrt_device *xdev, 223 223 struct xrt_space_relation *out_relation) 224 224 {
+3 -3
src/xrt/ipc/server/ipc_server_handler.c
··· 533 533 ipc_handle_space_locate_space(volatile struct ipc_client_state *ics, 534 534 uint32_t base_space_id, 535 535 const struct xrt_pose *base_offset, 536 - uint64_t at_timestamp, 536 + int64_t at_timestamp, 537 537 uint32_t space_id, 538 538 const struct xrt_pose *offset, 539 539 struct xrt_space_relation *out_relation) ··· 572 572 uint32_t base_space_id, 573 573 const struct xrt_pose *base_offset, 574 574 uint32_t space_count, 575 - uint64_t at_timestamp) 575 + int64_t at_timestamp) 576 576 { 577 577 IPC_TRACE_MARKER(); 578 578 struct ipc_message_channel *imc = (struct ipc_message_channel *)&ics->imc; ··· 673 673 ipc_handle_space_locate_device(volatile struct ipc_client_state *ics, 674 674 uint32_t base_space_id, 675 675 const struct xrt_pose *base_offset, 676 - uint64_t at_timestamp, 676 + int64_t at_timestamp, 677 677 uint32_t xdev_id, 678 678 struct xrt_space_relation *out_relation) 679 679 {
+3 -3
src/xrt/ipc/shared/proto.json
··· 122 122 "in": [ 123 123 {"name": "base_space_id", "type": "uint32_t"}, 124 124 {"name": "base_offset", "type": "struct xrt_pose"}, 125 - {"name": "at_timestamp", "type": "uint64_t"}, 125 + {"name": "at_timestamp", "type": "int64_t"}, 126 126 {"name": "space_id", "type": "uint32_t"}, 127 127 {"name": "offset", "type": "struct xrt_pose"} 128 128 ], ··· 137 137 {"name": "base_space_id", "type": "uint32_t"}, 138 138 {"name": "base_offset", "type": "struct xrt_pose"}, 139 139 {"name": "space_count", "type": "uint32_t"}, 140 - {"name": "at_timestamp", "type": "uint64_t"} 140 + {"name": "at_timestamp", "type": "int64_t"} 141 141 ] 142 142 }, 143 143 ··· 145 145 "in": [ 146 146 {"name": "base_space_id", "type": "uint32_t"}, 147 147 {"name": "base_offset", "type": "struct xrt_pose"}, 148 - {"name": "at_timestamp", "type": "uint64_t"}, 148 + {"name": "at_timestamp", "type": "int64_t"}, 149 149 {"name": "xdev_id", "type": "uint32_t"} 150 150 ], 151 151 "out": [