Changeset cf56b18a in rtems for testsuites
- Timestamp:
- 02/02/18 06:48:08 (6 years ago)
- Branches:
- 5, master
- Children:
- c1c71cd
- Parents:
- 1e483a62
- git-author:
- Sebastian Huber <sebastian.huber@…> (02/02/18 06:48:08)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (02/02/18 06:50:19)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuites/smptests/smpschededf01/init.c
r1e483a62 rcf56b18a 1 1 /* 2 * Copyright (c) 2017 embedded brains GmbH. All rights reserved.2 * Copyright (c) 2017, 2018 embedded brains GmbH. All rights reserved. 3 3 * 4 4 * embedded brains GmbH … … 25 25 26 26 typedef struct { 27 uint_fast32_t one_tick_busy;28 27 rtems_id task[2]; 29 28 } test_context; … … 31 30 static test_context test_instance; 32 31 33 static void t(test_context *ctx, rtems_interval p, uint_fast32_t c)32 static void t(test_context *ctx, rtems_interval p, long nanoseconds) 34 33 { 35 34 rtems_status_code sc; 36 35 rtems_id period; 37 36 rtems_name name; 38 uint_fast32_t busy;39 37 40 38 sc = rtems_object_get_classic_name(rtems_task_self(), &name); … … 44 42 rtems_test_assert(sc == RTEMS_SUCCESSFUL); 45 43 46 busy = (c - 1) * ctx->one_tick_busy + (4 * ctx->one_tick_busy) / 5;47 48 44 while (true) { 49 rtems_test_busy (busy);45 rtems_test_busy_cpu_usage(0, nanoseconds); 50 46 51 47 sc = rtems_rate_monotonic_period(period, p); … … 58 54 test_context *ctx = (test_context *) arg; 59 55 60 t(ctx, 50, 25 );56 t(ctx, 50, 25000000); 61 57 } 62 58 … … 65 61 test_context *ctx = (test_context *) arg; 66 62 67 t(ctx, 75, 30 );63 t(ctx, 75, 30000000); 68 64 } 69 65 … … 71 67 { 72 68 rtems_status_code sc; 73 74 ctx->one_tick_busy = rtems_test_get_one_tick_busy_count();75 69 76 70 sc = rtems_task_create(
Note: See TracChangeset
for help on using the changeset viewer.