xref: /third_party/musl/src/misc/getpriority.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/src/misc/
1570af302Sopenharmony_ci#include <sys/resource.h>
2570af302Sopenharmony_ci#include "syscall.h"
3570af302Sopenharmony_ci
4570af302Sopenharmony_ciint getpriority(int which, id_t who)
5570af302Sopenharmony_ci{
6570af302Sopenharmony_ci#ifdef __LITEOS_A__
7570af302Sopenharmony_ci	return syscall(SYS_getpriority, which, who);
8570af302Sopenharmony_ci#else
9570af302Sopenharmony_ci	int ret = syscall(SYS_getpriority, which, who);
10570af302Sopenharmony_ci	if (ret < 0) return ret;
11570af302Sopenharmony_ci	return 20-ret;
12570af302Sopenharmony_ci#endif
13570af302Sopenharmony_ci}
14

Indexes created Thu Nov 07 10:32:03 CST 2024