@@ -387,7 +387,7 @@ struct rt_object
387
387
388
388
#ifdef RT_USING_MODULE
389
389
void *module_id; /* *< id of application module */
390
- #endif
390
+ #endif /* RT_USING_MODULE */
391
391
rt_list_t list; /* *< list node of kernel object */
392
392
};
393
393
typedef struct rt_object *rt_object_t ; /* *< Type for kernel objects. */
@@ -450,8 +450,8 @@ struct rt_object_information
450
450
#define __ON_HOOK_ARGS (__hook, argv ) do {if ((__hook) != RT_NULL) __hook argv; } while (0 )
451
451
#else
452
452
#define __ON_HOOK_ARGS (__hook, argv )
453
- #endif
454
- #endif
453
+ #endif /* RT_HOOK_USING_FUNC_PTR */
454
+ #endif /* RT_USING_HOOK */
455
455
456
456
#ifndef __on_rt_interrupt_switch_hook
457
457
#define __on_rt_interrupt_switch_hook () __ON_HOOK_ARGS(rt_interrupt_switch_hook, ())
@@ -528,7 +528,7 @@ typedef void (*rt_sighandler_t)(int signo);
528
528
typedef siginfo_t rt_siginfo_t ;
529
529
530
530
#define RT_SIG_MAX 32
531
- #endif
531
+ #endif /* RT_USING_SIGNALS */
532
532
/* *@}*/
533
533
534
534
/* *
@@ -576,11 +576,11 @@ typedef siginfo_t rt_siginfo_t;
576
576
577
577
#ifndef RT_SCHEDULE_IPI
578
578
#define RT_SCHEDULE_IPI 0
579
- #endif
579
+ #endif /* RT_SCHEDULE_IPI */
580
580
581
581
#ifndef RT_STOP_IPI
582
582
#define RT_STOP_IPI 1
583
- #endif
583
+ #endif /* RT_STOP_IPI */
584
584
585
585
/* *
586
586
* CPUs definitions
@@ -600,12 +600,12 @@ struct rt_cpu
600
600
rt_uint8_t ready_table[32 ];
601
601
#else
602
602
rt_uint32_t priority_group;
603
- #endif
603
+ #endif /* RT_THREAD_PRIORITY_MAX > 32 */
604
604
605
605
rt_tick_t tick;
606
606
};
607
607
608
- #endif
608
+ #endif /* RT_USING_SMP */
609
609
610
610
/* *
611
611
* Thread structure
@@ -619,7 +619,7 @@ struct rt_thread
619
619
620
620
#ifdef RT_USING_MODULE
621
621
void *module_id; /* *< id of application module */
622
- #endif
622
+ #endif /* RT_USING_MODULE */
623
623
624
624
rt_list_t list; /* *< the object list */
625
625
rt_list_t tlist; /* *< the thread list */
@@ -650,32 +650,32 @@ struct rt_thread
650
650
#if RT_THREAD_PRIORITY_MAX > 32
651
651
rt_uint8_t number;
652
652
rt_uint8_t high_mask;
653
- #endif
653
+ #endif /* RT_THREAD_PRIORITY_MAX > 32 */
654
654
rt_uint32_t number_mask;
655
655
656
- #if defined( RT_USING_EVENT)
656
+ #ifdef RT_USING_EVENT
657
657
/* thread event */
658
658
rt_uint32_t event_set;
659
659
rt_uint8_t event_info;
660
- #endif
660
+ #endif /* RT_USING_EVENT */
661
661
662
- #if defined( RT_USING_SIGNALS)
662
+ #ifdef RT_USING_SIGNALS
663
663
rt_sigset_t sig_pending; /* *< the pending signals */
664
664
rt_sigset_t sig_mask; /* *< the mask bits of signal */
665
665
666
666
#ifndef RT_USING_SMP
667
667
void *sig_ret; /* *< the return stack pointer from signal */
668
- #endif
668
+ #endif /* RT_USING_SMP */
669
669
rt_sighandler_t *sig_vectors; /* *< vectors of signal handler */
670
670
void *si_list; /* *< the signal infor list */
671
- #endif
671
+ #endif /* RT_USING_SIGNALS */
672
672
673
673
rt_ubase_t init_tick; /* *< thread's initialized tick */
674
674
rt_ubase_t remaining_tick; /* *< remaining tick */
675
675
676
676
#ifdef RT_USING_CPU_USAGE
677
677
rt_uint64_t duration_tick; /* *< cpu usage tick */
678
- #endif
678
+ #endif /* RT_USING_CPU_USAGE */
679
679
680
680
struct rt_timer thread_timer; /* *< built-in thread timer */
681
681
@@ -684,7 +684,7 @@ struct rt_thread
684
684
/* light weight process if present */
685
685
#ifdef RT_USING_LWP
686
686
void *lwp;
687
- #endif
687
+ #endif /* RT_USING_LWP */
688
688
689
689
rt_ubase_t user_data; /* *< private user data beyond this thread */
690
690
};
@@ -732,7 +732,7 @@ struct rt_semaphore
732
732
rt_uint16_t reserved; /* *< reserved field */
733
733
};
734
734
typedef struct rt_semaphore *rt_sem_t ;
735
- #endif
735
+ #endif /* RT_USING_SEMAPHORE */
736
736
737
737
#ifdef RT_USING_MUTEX
738
738
/* *
@@ -750,7 +750,7 @@ struct rt_mutex
750
750
struct rt_thread *owner; /* *< current owner of mutex */
751
751
};
752
752
typedef struct rt_mutex *rt_mutex_t ;
753
- #endif
753
+ #endif /* RT_USING_MUTEX */
754
754
755
755
#ifdef RT_USING_EVENT
756
756
/* *
@@ -770,7 +770,7 @@ struct rt_event
770
770
rt_uint32_t set; /* *< event set */
771
771
};
772
772
typedef struct rt_event *rt_event_t ;
773
- #endif
773
+ #endif /* RT_USING_EVENT */
774
774
775
775
#ifdef RT_USING_MAILBOX
776
776
/* *
@@ -791,7 +791,7 @@ struct rt_mailbox
791
791
rt_list_t suspend_sender_thread; /* *< sender thread suspended on this mailbox */
792
792
};
793
793
typedef struct rt_mailbox *rt_mailbox_t ;
794
- #endif
794
+ #endif /* RT_USING_MAILBOX */
795
795
796
796
#ifdef RT_USING_MESSAGEQUEUE
797
797
/* *
@@ -815,7 +815,7 @@ struct rt_messagequeue
815
815
rt_list_t suspend_sender_thread; /* *< sender thread suspended on this message queue */
816
816
};
817
817
typedef struct rt_messagequeue *rt_mq_t ;
818
- #endif
818
+ #endif /* RT_USING_MESSAGEQUEUE */
819
819
820
820
/* *@}*/
821
821
@@ -839,7 +839,7 @@ struct rt_memory
839
839
rt_size_t max; /* *< maximum usage */
840
840
};
841
841
typedef struct rt_memory *rt_mem_t ;
842
- #endif
842
+ #endif /* RT_USING_HEAP */
843
843
844
844
/*
845
845
* memory management
@@ -848,11 +848,11 @@ typedef struct rt_memory *rt_mem_t;
848
848
849
849
#ifdef RT_USING_SMALL_MEM
850
850
typedef rt_mem_t rt_smem_t ;
851
- #endif
851
+ #endif /* RT_USING_SMALL_MEM */
852
852
853
853
#ifdef RT_USING_SLAB
854
854
typedef rt_mem_t rt_slab_t ;
855
- #endif
855
+ #endif /* RT_USING_SLAB */
856
856
857
857
#ifdef RT_USING_MEMHEAP
858
858
/* *
@@ -870,7 +870,7 @@ struct rt_memheap_item
870
870
struct rt_memheap_item *prev_free; /* *< prev free memheap item */
871
871
#ifdef RT_USING_MEMTRACE
872
872
rt_uint8_t owner_thread_name[4 ]; /* *< owner thread name */
873
- #endif
873
+ #endif /* RT_USING_MEMTRACE */
874
874
};
875
875
876
876
/* *
@@ -894,7 +894,7 @@ struct rt_memheap
894
894
struct rt_semaphore lock; /* *< semaphore lock */
895
895
rt_bool_t locked; /* *< External lock mark */
896
896
};
897
- #endif
897
+ #endif /* RT_USING_MEMHEAP */
898
898
899
899
#ifdef RT_USING_MEMPOOL
900
900
/* *
@@ -916,7 +916,7 @@ struct rt_mempool
916
916
rt_list_t suspend_thread; /* *< threads pended on this resource */
917
917
};
918
918
typedef struct rt_mempool *rt_mp_t ;
919
- #endif
919
+ #endif /* RT_USING_MEMPOOL */
920
920
921
921
/* *@}*/
922
922
@@ -1036,7 +1036,7 @@ struct rt_device_ops
1036
1036
rt_size_t (*write) (rt_device_t dev, rt_off_t pos, const void *buffer, rt_size_t size);
1037
1037
rt_err_t (*control)(rt_device_t dev, int cmd, void *args);
1038
1038
};
1039
- #endif
1039
+ #endif /* RT_USING_DEVICE_OPS */
1040
1040
1041
1041
/* *
1042
1042
* WaitQueue structure
@@ -1076,12 +1076,12 @@ struct rt_device
1076
1076
rt_size_t (*read) (rt_device_t dev, rt_off_t pos, void *buffer, rt_size_t size);
1077
1077
rt_size_t (*write) (rt_device_t dev, rt_off_t pos, const void *buffer, rt_size_t size);
1078
1078
rt_err_t (*control)(rt_device_t dev, int cmd, void *args);
1079
- #endif
1079
+ #endif /* RT_USING_DEVICE_OPS */
1080
1080
1081
1081
#ifdef RT_USING_POSIX_DEVIO
1082
1082
const struct dfs_file_ops *fops;
1083
1083
struct rt_wqueue wait_queue;
1084
- #endif
1084
+ #endif /* RT_USING_POSIX_DEVIO */
1085
1085
1086
1086
void *user_data; /* *< device private data */
1087
1087
};
@@ -1194,7 +1194,7 @@ struct rt_device_graphic_ops
1194
1194
#define rt_graphix_ops (device ) ((struct rt_device_graphic_ops *)(device->user_data))
1195
1195
1196
1196
/* *@}*/
1197
- #endif
1197
+ #endif /* RT_USING_DEVICE */
1198
1198
1199
1199
#ifdef __cplusplus
1200
1200
}
@@ -1211,6 +1211,6 @@ enum TICK_WAIT {
1211
1211
1212
1212
}
1213
1213
1214
- #endif /* end of __cplusplus */
1214
+ #endif /* __cplusplus */
1215
1215
1216
- #endif
1216
+ #endif /* __RT_DEF_H__ */
0 commit comments