Repository navigation
Conversation
…sed and replaced ids
…elative name An absolute host temp path is not mapped by the Linux guest resolver. Found by xXPBSXx on boykopovar#9097.
…lative name An absolute host temp path is not mapped by the Linux guest resolver. Found by xXPBSXx on boykopovar#9097.
The PS5 3.20 export lists have ksem_* in libkernel as well as libkernel_sys, and on Windows a libkernel import never reaches libkernel_sys, so titles importing them from libkernel did not find them. Following pipe1os's review on boykopovar#9284, also: ENOSPC from ksem_init when no descriptor is left, the SEM_MAX limit of 30 with ENOSPC, and dup/dup2 from a ksem id throwing as for a kqueue.
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Exports with a name or library/NID already present in
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Builds on boykopovar#9284 and implements POSIX message queues in a new
libkernel_sys/Mqueue.cpp, following FreeBSD 11sys/kern/uipc_mqueue.c. Until boykopovar#9284 merges, this PR's diff also shows boykopovar#9284's commits. This PR's own change is the last three commits.kmq_open(path, flags, mode, const mq_attr*)kmq_timedsend(fd, msg, len, prio, abstime)EINVALforprio >= MQ_PRIO_MAX(64);EMSGSIZEforlen > mq_msgsize;EAGAINwhen full withO_NONBLOCK;EBADFwhen not open for writingkmq_timedreceive(fd, buf, len, prio*, abstime)EMSGSIZEforlen < mq_msgsize;EAGAINwhen empty withO_NONBLOCK;EBADFwhen not open for readingkmq_setattr(fd, attr, oattr)O_NONBLOCKchanges, and othermq_flagsbits giveEINVAL;oattrgets the flags,maxmsg,msgsizeandcurmsgskmq_unlink(path)ENOENTif it is absent; open descriptors keep the queuekmq_open's rules:EINVALfor(flags & O_ACCMODE) == O_ACCMODEorO_EXEC;O_CREATand an attribute,mq_maxmsgmust be 1..100 andmq_msgsize1..16384, orEINVAL; without one, the defaults are 10 and 1024;ENAMETOOLONG) and must be/namewith no second/(EINVAL); a NULL name givesEFAULT;ENOENTfor a missing name withoutO_CREAT, andEEXISTwithO_CREAT | O_EXCL.For both send and receive, as in
mqueue_sendandmqueue_receive, theabstimetv_nseccheck (EINVAL) applies only when the call has to wait. A wait ends withETIMEDOUTat the absoluteCLOCK_REALTIMEdeadline.mq_attris eight 64-bit fields.Each open queue is a descriptor reserved on the host null device, carrying its own access mode and
O_NONBLOCK, with a process-local name table. boykopovar#9284's close observer drops a descriptor's entry when it is closed or replaced.kmq_notifyfollows in a separate PR. A debt line records the limits: process-local names,modeand permissions not modelled, queue descriptors not usable withselect,pollorkevent, anddupnot giving a queue.This PR conflicts textually with boykopovar#9293 at adjacent stubs (
kmq_unlinkandksem_closeinExport.Discovery.cpp). It is resolved by a merge ofmainafter either lands.Tested
Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release. These are CPU-side exports, so no GPU is involved.
guest_kernel_sys_mqueue(core/libs/tests/GuestKernelSysMqueue.cpp):kmq_openrule and the default attributes;EMSGSIZE, andEAGAINafterkmq_setattrsetsO_NONBLOCK;abstime, accepted when there is room or a message butEINVALwhen the call has to wait;ETIMEDOUTafter about 150 ms, and a blocked receiver woken by a send;EBADF), andkmq_unlinkwhile descriptors stay open;EBADF).kmq_open_nid_postfix not implemented. On this branch it passes, 3 of 3 runs.guest_kernel_sys_ksemandguest_kernel_sysstill pass, andtools/check_conventions.pypasses.tools/pr_overlap.pycrashes on this machine's partial clone, so it was replaced by a check against an index of every open PR's diff plusgit merge-tree. This branch merges cleanly withmainand with feat(libkernel_sys): identify the initial pthread boykopovar/AnyPS5#9160, feat(libkernel_sys): implement uuidgen boykopovar/AnyPS5#9195, feat(libkernel_sys): implement wait3 and wait4 boykopovar/AnyPS5#9162, feat(libkernel_sys): implement statfs symlinkat and futimesat boykopovar/AnyPS5#9161, feat(libkernel): implement four pthread_attr forms boykopovar/AnyPS5#9156, feat(libkernel): implement getlogin boykopovar/AnyPS5#9171, feat(libkernel): implement pselect over select boykopovar/AnyPS5#9273, feat(libkernel): implement tcgetsid boykopovar/AnyPS5#9242, feat(libkernel_sys): implement pwrite through the shared POSIX provider boykopovar/AnyPS5#9019, feat(libkernel_sys): implement fstat boykopovar/AnyPS5#9008, feat(libkernel_sys): implement sceKernelFlock over flock boykopovar/AnyPS5#9097, feat(libkernel_sys): implement the scePthread scope, atfork and setconcurrency forms boykopovar/AnyPS5#9141, feat(libkernel_sys): implement chown, lchown, fchownat and linkat boykopovar/AnyPS5#9103, feat(libkernel_sys): implement the scePthreadBarrier, cpuclockid, concurrency and msync forms boykopovar/AnyPS5#8987 and feat(libkernel): report open, read and close notes on watched files boykopovar/AnyPS5#7121. The one conflict is with feat(libkernel): implement the named ksem semaphores boykopovar/AnyPS5#9293, as described above.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)