[PATCH rtems-examples 4/6] psx_sched_report/psx_sched_report.c: Do not assume pid=1

Joel Sherrill joel at rtems.org
Sun Apr 23 20:44:46 UTC 2023


---
 posix_api/psx_sched_report/psx_sched_report.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/posix_api/psx_sched_report/psx_sched_report.c b/posix_api/psx_sched_report/psx_sched_report.c
index b0381aa..ec0530c 100644
--- a/posix_api/psx_sched_report/psx_sched_report.c
+++ b/posix_api/psx_sched_report/psx_sched_report.c
@@ -25,7 +25,7 @@ void print_sched_info(
   printf( "Information on %s\n", s );
   min = sched_get_priority_min( policy );
   max = sched_get_priority_max( policy );
-  (void) sched_rr_get_interval( 1, &t );
+  (void) sched_rr_get_interval( getpid(), &t );
   levels = abs(max - min + 1);
   printf( "\tSupports %d priority levels (%d - %d)\n", levels, min, max  );
   if ( levels >= 32 )
-- 
1.8.3.1



More information about the devel mailing list