Skip to content

Make EE data const or zero-initialized for cleaner (re-)initialization#867

Open
uyjulian wants to merge 1 commit into
ps2dev:masterfrom
uyjulian:ee_move_out_of_data_section
Open

Make EE data const or zero-initialized for cleaner (re-)initialization#867
uyjulian wants to merge 1 commit into
ps2dev:masterfrom
uyjulian:ee_move_out_of_data_section

Conversation

@uyjulian

Copy link
Copy Markdown
Member

Some functions have added const arguments accordingly
Initialization has been moved inside functions, or ctors if there is no conveient function
Some global variables have been made local, static, or removed
Sema, Thread, DmacHandler, IntcHandler, and fd handle 0 as invalid

wLE tested working

…lization

Some functions have const arguments accordingly
Initialization has been moved inside functions, or ctors if there is no conveient function
Some global variables have been made local, static, or removed
Sema, Thread, DmacHandler, IntcHandler, and fd handle 0 as invalid
@fjtrujy

fjtrujy commented Jun 18, 2026

Copy link
Copy Markdown
Member

Hello @uyjulian ,
I don't have anything against this PR; however, there are many conditions that were changed from >= 0 to > 0 and the opposite in other scenarios from < 0 to <= 0, when creating semaphores, mutexes, threads, and similar.
Have you checked that all these return values were previously wrong?

@uyjulian

Copy link
Copy Markdown
Member Author

The return value on error is -1, but those functions never return the value 0. I am using that property to initialize the variables, so I changed the conditions so that it can handle that case properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants