mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-10 03:56:49 +00:00
* 引入cargo * 取消对Cargo.lock的跟踪 * 解决vscode报错问题 * new: rust的代码能够调用c语言的printk_color * 1、将原本run.sh的工作拆解,变为几个不同的make命令 2、在docker镜像中编译rust * 更改workflow * update workflow * new: 解决workflow无法通过编译的问题
23 lines
843 B
C
23 lines
843 B
C
#pragma once
|
|
#include <common/stddef.h>
|
|
|
|
// 当函数的返回值未被使用时,编译器抛出警告信息
|
|
#define __must_check __attribute__((__warn_unused_result__))
|
|
#define __force __attribute__((force))
|
|
// 无返回值的属性
|
|
#define __noreturn __attribute__((__noreturn__))
|
|
/*
|
|
* Optional: only supported since clang >= 14.0
|
|
*
|
|
* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-error-function-attribute
|
|
*/
|
|
#if __has_attribute(__error__)
|
|
#define __compiletime_error(msg) __attribute__((__error__(msg)))
|
|
#else
|
|
#define __compiletime_error(msg)
|
|
#endif
|
|
|
|
typedef uint8_t __attribute__((__may_alias__)) __u8_alias_t;
|
|
typedef uint16_t __attribute__((__may_alias__)) __u16_alias_t;
|
|
typedef uint32_t __attribute__((__may_alias__)) __u32_alias_t;
|
|
typedef uint64_t __attribute__((__may_alias__)) __u64_alias_t; |