files
kolibrios/programs/develop/ktcc/lib/libshell/shell_get_pid.c
Andrew 8a2a454ba9
Some checks failed
Build system / Check kernel codestyle (pull_request) Successful in 20s
Build system / Build (pull_request) Failing after 40s
develop/ktcc: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and include paths.
- These changes also update the CI build files in `.gitea/workflows/`.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
2025-05-24 12:07:42 +01:00

12 lines
227 B
C

#include <shell_api.h>
#include <string.h>
unsigned shell_get_pid()
{
unsigned pid;
__shell_init();
*__shell_shm = SHELL_PID;
__SHELL_WAIT();
memcpy(&pid, __shell_shm+1, sizeof(unsigned));
return pid;
}