-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix lock api #198
Fix lock api #198
Conversation
@@ -1099,7 +1099,7 @@ int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpat | |||
{ | |||
// TODO: Do better implementation following https://linux.die.net/man/2/renameat | |||
// for now use the same as rename | |||
return _rename(oldpath, newpath); | |||
return rename(oldpath, newpath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix dummy warning
@@ -589,6 +589,17 @@ int sceKernelPollSema(SceUID semaid, int signal); | |||
*/ | |||
int sceKernelReferSemaStatus(SceUID semaid, SceKernelSemaInfo *info); | |||
|
|||
/** Attribute for lightweight mutex. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding extra documentation for lightweight mutex
Thank you for the PRs @fjtrujy |
it's kinda odd that the PSP kernel even ships these functions since it's inherently non-parallel with its use of cooperative multitasking, except when using the Media Engine CPU - but from what i gathered from looking at the code of uofw, for those locks it uses custom code. maybe @fjtrujy can shed some light ? |
Not sure what specific stuff do you want to know more about? |
no, i mean why does the PSP OS provide mutexes, locks and semaphores when there's no real parallel execution ? |
If you have a fully single thread, obviously you can’t have concurrency issues, but as soon as you start “emulating threads” (have in mind that PSP hardware is still a single thread), you must have them otherwise you can suffer concurrency issues. |
To have thread-safe operations for all the
newlib
operations we have been required to do several PR:newlib
psptoolchain-ee
pspsdk
This PR skips the usage of the dummy lock API, letting us implement the specific one in the
pspsdk/libcglue
Cheers