• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ directive_failed函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中directive_failed函数的典型用法代码示例。如果您正苦于以下问题:C++ directive_failed函数的具体用法?C++ directive_failed怎么用?C++ directive_failed使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了directive_failed函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Init

rtems_task Init(
  rtems_task_argument argument
)
{
  uint32_t    index;
  rtems_status_code status;

  puts( "\n\n*** TEST 20 ***" );

  Task_name[ 1 ] =  rtems_build_name( 'T', 'A', '1', ' ' );
  Task_name[ 2 ] =  rtems_build_name( 'T', 'A', '2', ' ' );
  Task_name[ 3 ] =  rtems_build_name( 'T', 'A', '3', ' ' );
  Task_name[ 4 ] =  rtems_build_name( 'T', 'A', '4', ' ' );
  Task_name[ 5 ] =  rtems_build_name( 'T', 'A', '5', ' ' );
  Task_name[ 6 ] =  rtems_build_name( 'T', 'A', '6', ' ' );

  for ( index = 1 ; index <= 6 ; index++ ) {
    status = rtems_task_create(
      Task_name[ index ],
      Priorities[ index ],
      RTEMS_MINIMUM_STACK_SIZE * 4,
      RTEMS_DEFAULT_MODES,
      RTEMS_DEFAULT_ATTRIBUTES,
      &Task_id[ index ]
    );
    directive_failed( status, "rtems_task_create loop" );
  }

  for ( index = 1 ; index <= 6 ; index++ ) {
    status = rtems_task_start( Task_id[ index ], Task_1_through_6, index );
    directive_failed( status, "rtems_task_start loop" );
  }

  Count.count[ 1 ] = 0;
  Count.count[ 2 ] = 0;
  Count.count[ 3 ] = 0;
  Count.count[ 4 ] = 0;
  Count.count[ 5 ] = 0;
  Count.count[ 6 ] = 0;

  status = rtems_task_delete( RTEMS_SELF );
  directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
}
开发者ID:aniwang2013,项目名称:leon-rtems,代码行数:43,代码来源:init.c


示例2: Task_2

rtems_task Task_2(
  rtems_task_argument argument
)
{
  rtems_status_code status;

  Task_2_preempted = FALSE;

  puts( "TA2 - Suspending self" );
  status = rtems_task_suspend( RTEMS_SELF );
  directive_failed( status, "rtems_task_suspend of TA2" );

  puts( "TA2 - signal_return preempted correctly" );

  Task_2_preempted = TRUE;

  status = rtems_task_suspend( RTEMS_SELF );
  directive_failed( status, "rtems_task_suspend of TA2" );
}
开发者ID:FullMentalPanic,项目名称:RTEMS_NEW_TOOL_CHAIN,代码行数:19,代码来源:task2.c


示例3: Task_1

rtems_task Task_1(
  rtems_task_argument argument
)
{
  rtems_id          tid2;
  rtems_id          tid3;
  rtems_status_code status;
  rtems_name        tid2_name;
  uint32_t    previous_priority;

  puts( "TA1 - rtems_task_wake_after - sleep 1 second" );
  status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() );
  directive_failed( status, "rtems_task_wake_after" );

  status = rtems_task_ident( Task_name[ 2 ], RTEMS_SEARCH_ALL_NODES, &tid2 );
  directive_failed( status, "rtems_task_ident of TA2" );

  printf(
    "TA1 - rtems_task_ident - tid of TA2 (0x%.8" PRIxrtems_id ")\n", tid2
  );
  status = rtems_object_get_classic_name( tid2, &tid2_name );
  directive_failed( status, "rtems_object_get_classic_name of TA2" );

  printf( "TA1 - rtems_get_classic_name - id -> name of TA2 %sOK\n",
    (tid2_name != Task_name[2]) ? "NOT " : "" );

  status = rtems_task_ident( Task_name[ 3 ], RTEMS_SEARCH_ALL_NODES, &tid3 );
  directive_failed( status, "rtems_task_ident of TA3" );

  printf(
    "TA1 - rtems_task_ident - tid of TA3 (0x%.8" PRIxrtems_id ")\n", tid3
  );

  status = rtems_task_set_priority( tid3, 2, &previous_priority );
  directive_failed( status, "rtems_task_set_priority" );

  puts( "TA1 - rtems_task_set_priority - set TA3's priority to 2" );

  puts( "TA1 - rtems_task_suspend - suspend TA2" );
  status = rtems_task_suspend( tid2 );
  directive_failed( status, "rtems_task_suspend of TA2" );

  puts( "TA1 - rtems_task_delete - delete TA2" );
  status = rtems_task_delete( tid2 );
  directive_failed( status, "rtems_task_delete of TA2" );

  puts( "TA1 - rtems_task_wake_after - sleep for 5 seconds" );
  status = rtems_task_wake_after( 5 * rtems_clock_get_ticks_per_second() );
  directive_failed( status, "rtems_task_wake_after" );

  puts( "*** END OF TEST 2 ***" );
  rtems_test_exit( 0 );
}
开发者ID:aniwang2013,项目名称:leon-rtems,代码行数:53,代码来源:task1.c


示例4: Delayed_resume

rtems_timer_service_routine Delayed_resume(
  rtems_id  ignored_id,
  void     *ignored_address
)
{
  rtems_status_code status;

  status = rtems_task_resume( Task_id[ 1 ] );
  directive_failed( status, "rtems_task_resume of self" );
}
开发者ID:aniwang2013,项目名称:leon-rtems,代码行数:10,代码来源:delay.c


示例5: Task_2

rtems_task Task_2(
  rtems_task_argument argument
)
{
  rtems_status_code status;

  puts( "TA2 - rtems_task_wake_after - sleep 1 minute" );
  status = rtems_task_wake_after( 60*rtems_clock_get_ticks_per_second() );
  directive_failed( status, "rtems_task_wake_after in TA2" );
}
开发者ID:AlexShiLucky,项目名称:rtems,代码行数:10,代码来源:task2.c


示例6: First_FP_task

rtems_task First_FP_task(
  rtems_task_argument argument
)
{
  rtems_status_code status;
  rtems_id          tid;
  rtems_time_of_day time;
  uint32_t    task_index;
  INTEGER_DECLARE;
  FP_DECLARE;

  status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
  directive_failed( status, "rtems_task_ident" );

  task_index = task_number( tid );

  INTEGER_LOAD( INTEGER_factors[ task_index ] );
  FP_LOAD( FP_factors[ task_index ] );

  put_name( Task_name[ task_index ], FALSE );
  printf(
    " - integer base = (0x%" PRIx32 ")\n",
    INTEGER_factors[ task_index ]
  );
  put_name( Task_name[ task_index ], FALSE );
  #if ( RTEMS_HAS_HARDWARE_FP == 1 )
    printf( " - float base = (%g)\n", FP_factors[ task_index ] );
  #else
    printf( " - float base = (NA)\n" );
  #endif

  if ( argument == 0 ) {
    status = rtems_task_restart( RTEMS_SELF, 1 );
    directive_failed( status, "rtems_task_restart of RTEMS_SELF" );
  } else {
    build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
    status = rtems_clock_set( &time );
    directive_failed( status, "rtems_clock_set" );

    status = rtems_task_delete( RTEMS_SELF );
    directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
  }
}
开发者ID:aniwang2013,项目名称:leon-rtems,代码行数:43,代码来源:first.c


示例7: Other_Task

rtems_task Other_Task(rtems_task_argument ignored)
{
  rtems_status_code sc;

  puts( "Deleting task variables in another task" );
  sc = rtems_task_variable_delete(main_task, (void **)&taskvar1);
  directive_failed( sc, "delete loop for other task" );

  (void) rtems_task_delete( RTEMS_SELF );
}
开发者ID:aniwang2013,项目名称:leon-rtems,代码行数:10,代码来源:init.c


示例8: Task_2

rtems_task Task_2(
  rtems_task_argument argument
)
{
  rtems_status_code status;

  puts( "TA2 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL" );
  status = rtems_task_delete( RTEMS_SELF );
  directive_failed( status, "rtems_task_delete of TA2" );
}
开发者ID:Avanznow,项目名称:rtems,代码行数:10,代码来源:task2.c


示例9: Task_2

epos_task Task_2(
  epos_task_argument argument
)
{
  epos_status_code status;

  printk( "TA2 - epos_task_wake_after - sleep 1 minute" );
  status = epos_task_wake_after( 60*TICKS_PER_SECOND );
  directive_failed( status, "epos_task_wake_after in TA2" );
}
开发者ID:kelvin17,项目名称:epos_double_context,代码行数:10,代码来源:task2.c


示例10: benchmark_barrier_delete

static void benchmark_barrier_delete(
  int    iteration,
  void  *argument
)
{
  rtems_status_code status;

  status = rtems_barrier_delete( barrier[iteration] );
  directive_failed(status, "rtems_barrier_delete");
}
开发者ID:gedare,项目名称:rtems,代码行数:10,代码来源:init.c


示例11: Task_1

rtems_task Task_1(
  rtems_task_argument argument
)
{
  rtems_id          tid2;
  rtems_id          tid3;
  uint32_t    pass;
  rtems_status_code status;

  status = rtems_task_ident( Task_name[ 2 ], 1, &tid2 );
  directive_failed( status, "rtems_task_ident of TA2" );

  status = rtems_task_ident( Task_name[ 3 ], 1, &tid3 );
  directive_failed( status, "rtems_task_ident of TA3" );

  for ( pass=1 ; pass <= 3 ; pass++ ) {

    puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" );
    status = rtems_task_wake_after( 5*rtems_clock_get_ticks_per_second() );
    directive_failed( status, "rtems_task_wake_after of TA1" );

    puts( "TA1 - rtems_task_suspend - suspend TA3" );
    status = rtems_task_suspend( tid3 );
    if ( pass == 1 ) {
      fatal_directive_status(
         status,
         RTEMS_ALREADY_SUSPENDED,
         "rtems_task_suspend of TA3"
      );
    } else {
      directive_failed( status, "rtems_task_suspend of TA3" );
    }

    puts( "TA1 - rtems_task_resume - resume TA2" );
    status = rtems_task_resume( tid2 );
    directive_failed( status, "rtems_task_resume of TA2" );

    puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" );
    status = rtems_task_wake_after( 5*rtems_clock_get_ticks_per_second() );
    directive_failed( status, "rtems_task_wake_after" );

    puts( "TA1 - rtems_task_suspend - suspend TA2" );
    status = rtems_task_suspend( tid2 );
    directive_failed( status, "rtems_task_suspend of TA2" );

    puts( "TA1 - rtems_task_resume - resume TA3" );
    status = rtems_task_resume( tid3 );
    directive_failed( status, "rtems_task_resume" );
  }

  TEST_END();
  rtems_test_exit( 0 );
}
开发者ID:AlexShiLucky,项目名称:rtems,代码行数:53,代码来源:task1.c


示例12: Init

rtems_task Init(
  rtems_task_argument argument
)
{
  rtems_status_code status;
  rtems_id Task_id;

  Print_Warning();

  TEST_BEGIN();

  if (
    _Scheduler_Table[ 0 ].Operations.initialize
      != _Scheduler_priority_Initialize
  ) {
    puts( "  Error ==> " );
    puts( "Test only supported for deterministic priority scheduler\n" );
    rtems_test_exit( 0 );
  }

#define LOW_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 1u)
  status = rtems_task_create(
    rtems_build_name( 'T', 'A', '1', ' ' ),
    LOW_PRIORITY,
    RTEMS_MINIMUM_STACK_SIZE,
    RTEMS_DEFAULT_MODES,
    RTEMS_DEFAULT_ATTRIBUTES,
    &Task_id
  );
  directive_failed( status, "rtems_task_create Task_1" );

  status = rtems_task_start( Task_id, Task_1, 0 );
  directive_failed( status, "rtems_task_start Task_1" );

  benchmark_timer_initialize();
  benchmark_timer_read();
  benchmark_timer_initialize();
  timer_overhead = benchmark_timer_read();

  status = rtems_task_delete( RTEMS_SELF );
  directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
}
开发者ID:AlexShiLucky,项目名称:rtems,代码行数:42,代码来源:ilatency.c


示例13: Init

rtems_task Init( rtems_task_argument ignored )
{
    Print_Warning();

    TEST_BEGIN();

    Task_name[0] = rtems_build_name( 'T','A','0','1' );
    status = rtems_task_create(
                 Task_name[0],
                 30,               /* TA01 is low priority task */
                 RTEMS_MINIMUM_STACK_SIZE,
                 RTEMS_DEFAULT_MODES,
                 RTEMS_DEFAULT_ATTRIBUTES,
                 &Task_id[0]
             );
    directive_failed( status, "rtems_task_create of TA01");

    Task_name[1] = rtems_build_name( 'T','A','0','2' );
    status = rtems_task_create(
                 Task_name[1],
                 28,               /* TA02 is high priority task */
                 RTEMS_MINIMUM_STACK_SIZE,
                 RTEMS_DEFAULT_MODES,
                 RTEMS_DEFAULT_ATTRIBUTES,
                 &Task_id[1]
             );
    directive_failed( status, "rtems_task_create of TA02");

    /* Find loop overhead */
    benchmark_timer_initialize();
    for ( count1 = 0; count1 < ( BENCHMARKS * 2 ) - 1; count1++ );
    {
        /* rtems_task_resume( Task_id[1] ); */
    }
    tloop_overhead = benchmark_timer_read();

    status = rtems_task_start( Task_id[0], Task01, 0 );
    directive_failed( status, "rtems_task_start of TA01");

    status = rtems_task_delete( RTEMS_SELF );
    directive_failed( status, "rtems_task_delete of INIT");
}
开发者ID:goetzpf,项目名称:rtems,代码行数:42,代码来源:taskpreempt.c


示例14: Delayed_events_task

rtems_task Delayed_events_task(
  rtems_task_argument argument
)
{
  uint32_t    count;
  uint32_t    previous_mode;
  rtems_status_code status;
  rtems_event_set   events;

  status = rtems_task_mode(
    RTEMS_PREEMPT | RTEMS_TIMESLICE,
    RTEMS_PREEMPT_MASK | RTEMS_TIMESLICE_MASK,
    &previous_mode
  );
  directive_failed( status, "rtems_task_mode" );

  status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
  directive_failed( status, "rtems_timer_create" );

  while ( Stop_Test == FALSE ) {
    for ( count=DELAYED_EVENT_DOT_COUNT; Stop_Test == FALSE && count; count-- ){
      status = rtems_timer_fire_after(
        Timer_id[ 1 ],
        1,
        Delayed_send_event,
        NULL
      );
      directive_failed( status, "rtems_timer_reset" );

      status = rtems_event_receive(
        RTEMS_EVENT_16,
        RTEMS_DEFAULT_OPTIONS,
        RTEMS_NO_TIMEOUT,
        &events
      );
      directive_failed( status, "rtems_event_receive" );
    }
    put_dot('.');
  }

  Exit_test();
}
开发者ID:jfpmonteiro,项目名称:rtems-4.8-rhealstone,代码行数:42,代码来源:evtmtask.c


示例15: Task_3

rtems_task Task_3(
  rtems_task_argument argument
)
{
  rtems_status_code status;

  while( FOREVER ) {
    status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
    directive_failed( status, "rtems_task_wake_after" );
  }
}
开发者ID:aniwang2013,项目名称:leon-rtems,代码行数:11,代码来源:task3.c


示例16: Init

rtems_task Init(
  rtems_task_argument argument
)
{
  rtems_status_code sc;
  rtems_id          mutex;

  TEST_BEGIN();

  puts( "Create semaphore - priority ceiling unlocked - invalid ceiling" );
  sc = rtems_semaphore_create(
    rtems_build_name( 'S', 'E', 'M', '1' ),
    0,
    RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY_CEILING | RTEMS_PRIORITY,
    UINT32_MAX,
    &mutex
  );
  fatal_directive_status(sc, RTEMS_INVALID_PRIORITY, "rtems_semaphore_create");

  puts( "Create semaphore - priority ceiling locked - violate ceiling" );
  sc = rtems_semaphore_create(
    rtems_build_name( 'S', 'E', 'M', '1' ),
    0,
    RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY_CEILING | RTEMS_PRIORITY,
    (RTEMS_MAXIMUM_PRIORITY - 4u),
    &mutex
  );
  fatal_directive_status(sc, RTEMS_INVALID_PRIORITY, "rtems_semaphore_create");

  puts( "Create semaphore - priority ceiling unlocked" );
  sc = rtems_semaphore_create(
    rtems_build_name( 'S', 'E', 'M', '1' ),
    1,
    RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY_CEILING | RTEMS_PRIORITY,
    (RTEMS_MAXIMUM_PRIORITY - 4u),
    &mutex
  );
  directive_failed( sc, "rtems_semaphore_create" );

  puts( "Obtain semaphore -- violate ceiling" );
  sc = rtems_semaphore_obtain( mutex, RTEMS_DEFAULT_OPTIONS, 0 );
  fatal_directive_status(
    sc, RTEMS_INVALID_PRIORITY, "rtems_semaphore_obtain" );

  puts( "Release semaphore we did not obtain" );
  sc = rtems_semaphore_release( mutex );
  fatal_directive_status(
    sc, RTEMS_NOT_OWNER_OF_RESOURCE, "rtems_semaphore_release" );

  test_create_initially_locked_prio_inherit_sema();

  TEST_END();
  rtems_test_exit( 0 );
}
开发者ID:greenmeent,项目名称:rtems,代码行数:54,代码来源:init.c


示例17: benchmark_barrier_ident

static void benchmark_barrier_ident(
  int    iteration,
  void  *argument
)
{
  rtems_status_code status;
  rtems_id          id;

  status = rtems_barrier_ident( iteration+1, &id );
  directive_failed(status, "rtems_barrier_ident");
}
开发者ID:gedare,项目名称:rtems,代码行数:11,代码来源:init.c


示例18: Print_time

void Print_time( void )
{
  rtems_time_of_day time;
  rtems_status_code status;

  status = rtems_clock_get_tod( &time );
  directive_failed( status, "rtems_clock_get_tod" );

  put_name( Task_name[ 1 ], FALSE );
  print_time( "- rtems_clock_get_tod - ", &time, "\n" );
}
开发者ID:FullMentalPanic,项目名称:RTEMS_NEW_TOOL_CHAIN,代码行数:11,代码来源:prtime.c


示例19: starttask

void starttask(
  int arg
)
{
  rtems_id tid;
  rtems_status_code sc;
  rtems_task_priority priority;

  rtems_task_set_priority(RTEMS_SELF, RTEMS_CURRENT_PRIORITY, &priority);
  sc = rtems_task_create(rtems_build_name('S', 'R', 'V', arg + 'A'),
    priority,
    RTEMS_MINIMUM_STACK_SIZE,
    RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
    RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
    &tid);
  directive_failed( sc, "task create" );

  sc = rtems_task_start(tid, subtask, (rtems_task_argument) arg);
  directive_failed( sc, "task start" );
}
开发者ID:FullMentalPanic,项目名称:RTEMS_NEW_TOOL_CHAIN,代码行数:20,代码来源:init.c


示例20: Task_1

epos_task Task_1(
  epos_task_argument argument
)
{
  epos_id          tid2;
  epos_id          tid3;
  epos_status_code status;
  epos_name        tid2_name;
  uint32_t    previous_priority;

  printk( "TA1 - epos_task_wake_after - sleep 1 second" );
  status = epos_task_wake_after( 1*TICKS_PER_SECOND );
  directive_failed( status, "epos_task_wake_after" );

  status = epos_task_ident( Task_name[ 2 ], RTEMS_SEARCH_ALL_NODES, &tid2 );
  directive_failed( status, "epos_task_ident of TA2" );

  printk( "TA1 - epos_task_ident - tid of TA2 (0x%.8x)\n", tid2 );

  status = epos_object_get_classic_name( tid2, &tid2_name );
  directive_failed( status, "epos_object_get_classic_name of TA2" );

  printk( "TA1 - epos_get_classic_name - id -> name of TA2 %sOK\n",
    (tid2_name != Task_name[2]) ? "NOT " : "" );

  status = epos_task_ident( Task_name[ 3 ], RTEMS_SEARCH_ALL_NODES, &tid3 );
  directive_failed( status, "epos_task_ident of TA3" );

  printk( "TA1 - epos_task_ident - tid of TA3 (0x%.8x)\n", tid3 );

  status = epos_task_set_priority( tid3, 2, &previous_priority );
  directive_failed( status, "epos_task_set_priority" );

  printk( "TA1 - epos_task_set_priority - set TA3's priority to 2" );


  printk( "TA1 - epos_task_suspend - suspend TA2" );
  status = epos_task_suspend( tid2 );
  directive_failed( status, "epos_task_suspend of TA2" );

  printk( "TA1 - epos_task_delete - delete TA2" );
  status = epos_task_delete( tid2 );
  directive_failed( status, "epos_task_delete of TA2" );

  printk( "TA1 - epos_task_wake_after - sleep for 5 seconds" );
  status = epos_task_wake_after( 5*TICKS_PER_SECOND );
  directive_failed( status, "epos_task_wake_after" );

  printk( "*** END OF TEST 2 ***" );
  epos_test_exit( 0 );
}
开发者ID:kelvin17,项目名称:epos_double_context,代码行数:51,代码来源:task1.c



注:本文中的directive_failed函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ directoryChanged函数代码示例发布时间:2022-05-30
下一篇:
C++ direction函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap