libc: Rename pstname() to pstatname()

To avoid confusion with ptsname().
This commit is contained in:
apio 2022-10-22 14:30:41 +02:00
parent 727e227b09
commit 189986d23f
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ pid_t get_current_max_threads()
void display_process(struct pstat* pstatbuf) void display_process(struct pstat* pstatbuf)
{ {
printf("%ld %ld %s %s (%ld ms)\n", pstatbuf->pt_pid, pstatbuf->pt_ppid, pstatbuf->pt_name, pstname(pstatbuf), printf("%ld %ld %s %s (%ld ms)\n", pstatbuf->pt_pid, pstatbuf->pt_ppid, pstatbuf->pt_name, pstatname(pstatbuf),
pstatbuf->pt_time); pstatbuf->pt_time);
} }

View File

@ -27,7 +27,7 @@ extern "C"
pid_t pstat(pid_t pid, struct pstat* buf); pid_t pstat(pid_t pid, struct pstat* buf);
/* Returns a string representation of the process state in buf. */ /* Returns a string representation of the process state in buf. */
const char* pstname(struct pstat* buf); const char* pstatname(struct pstat* buf);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -9,7 +9,7 @@ extern "C"
return syscall(SYS_pstat, pid, buf); return syscall(SYS_pstat, pid, buf);
} }
const char* pstname(struct pstat* buf) const char* pstatname(struct pstat* buf)
{ {
switch (buf->pt_state) switch (buf->pt_state)
{ {