feat(libSceNpUtility): implement lookup async requests, waits and timeouts #10640
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10640"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by rocklouis055 on 2026-10-24T14:13:42Z.
What
Implements seven libSceNpUtility exports on the existing offline request model:
sceNpLookupAbortRequest,sceNpLookupCreateAsyncRequest,sceNpLookupPollAsync,sceNpLookupWaitAsync,sceNpLookupSetTimeout,sceNpWordFilterSetTimeoutandsceNpWordFilterWaitAsync.sceNpWordFilterAbortRequestandsceNpWordFilterPollAsyncnow use them, with unchanged results.INVALID_ID.sceNpLookupCreateAsyncRequesttakes the same 0x18-byte parameter assceNpWordFilterCreateAsyncRequest.cc4dbd45, offline and not measured on a console; recorded indocs/dev/debt/libSceNpUtility.md. The seven names leave the unknown-signature entries.Tested
Linux x86-64 (Ubuntu 26.04, GCC 15), Release:
guest_np_utility_offlineextended with the lookup async path (argument and size checks, poll before and after, a wait woken by the lookup starting, by an abort and by a deletion, a wait on a finished synchronous request), the word filter wait and both timeout setters (each bound, the no-effect combination, unknown and cross-service ids). Passes, also 30 times withctest --repeat until-fail:30and 50 direct runs. Windows not tested.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T14:19:24Z.
Review: COMMENTED
Reviewed exact head d7bee0e8a7a8137ee2cc02f87c7262910d56c614. The shared wait helper re-finds the request under the service mutex in its predicate, and completion, abort, and deletion notify the condition variable; I did not find a concrete defect in that state handling. One test-quality point:
WaitInThreadsleeps for 20 ms before invoking the completion/abort/deletion callback, but that delay does not prove the waiter has entered the blocked wait. If the test process is descheduled, the callback may happen first and the test can pass without exercising the wakeup path. A deterministic handshake or an observable waiter-ready condition would make the reported wakeup coverage stronger. Hosted eligibility, conventions, intake, labels and report checks pass; Linux/Windows product jobs were skipped. I have not independently run the reported 30-repeat test suite.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T14:49:02Z.
Review: COMMENTED
Follow-up review of exact head
4a45a249ad46b1d7cc07c9828a295d04fca529e5. The newreturnedcheck before the callback is a useful improvement: it makes a wait implementation that returns immediately fail, and the author reports that mutation was caught along with repeated successful runs. One residual timing gap remains, as the author also notes:enteredis set immediately before the wait call, so a waiter descheduled there for the whole delay could let the callback run before the blocking path is reached. This is a nonblocking test-quality observation; I have not independently run the reported repeated suite.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T15:26:05Z.
Review: APPROVED
Reviewed exact head
4a45a249ad46b1d7cc07c9828a295d04fca529e5. The shared request helpers keep all map and status access under each service mutex; waits re-find the request in the condition-variable predicate, and completion, abort and deletion notify waiters. Timeout bounds and offline no-effect semantics are recorded in the debt entry, and the tests cover lookup/word-filter paths, wrong IDs/services, null results, synchronous completion and wakeup by completion/abort/deletion. The author strengthened the wait test so an immediate-return implementation fails; the remaining scheduling caveat is acknowledged and does not block this review. Exact-headgit diff --check, conventions and merge-tree pass; hosted eligibility, conventions, labels and report pass, with product jobs skipped. The repeated Linux test run is author-reported; I did not independently execute it.