mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-07 22:34:12 +08:00
提交kernel部分的文件,本批次的文件只进行了依赖关系、注释、宏几个方面的调整,不涉及任何逻辑代码层面的改动
This commit is contained in:
parent
455bdf188c
commit
98b2c783e9
@ -18,8 +18,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "internal/list.h"
|
#include "internal/list.h"
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
#include "internal/list.h"
|
#include "internal/list.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef ListNode SlabHeap;
|
typedef ListNode SlabHeap;
|
||||||
|
|
||||||
|
|
||||||
@ -61,3 +66,7 @@ void* slabCalloc(SlabHeap *slab, size_t clrSize);
|
|||||||
* @param ptr The object slot pointer.
|
* @param ptr The object slot pointer.
|
||||||
*/
|
*/
|
||||||
void slabFree(SlabHeap *slab, void *ptr);
|
void slabFree(SlabHeap *slab, void *ptr);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} // extern "C"
|
||||||
|
#endif
|
@ -22,6 +22,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void spinlockLock(u32 *lock)
|
static inline void spinlockLock(u32 *lock)
|
||||||
{
|
{
|
||||||
u32 tmp;
|
u32 tmp;
|
||||||
@ -43,3 +48,7 @@ static inline void spinlockUnlock(u32 *lock)
|
|||||||
"sev"
|
"sev"
|
||||||
: : "r" (0), "r" (lock) : "memory");
|
: : "r" (0), "r" (lock) : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} // extern "C"
|
||||||
|
#endif
|
@ -19,5 +19,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
#define LIKELY(expr) __builtin_expect((expr), true)
|
#define LIKELY(expr) __builtin_expect((expr), true)
|
||||||
#define UNLIKELY(expr) __builtin_expect((expr), false)
|
#define UNLIKELY(expr) __builtin_expect((expr), false)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} // extern "C"
|
||||||
|
#endif
|
@ -18,17 +18,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a new kernel event.
|
* @brief Creates a new kernel event.
|
||||||
*
|
*
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
@ -28,8 +29,6 @@ extern "C"
|
|||||||
|
|
||||||
// TODO: Implement this using semaphores?
|
// TODO: Implement this using semaphores?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a new kernel mutex.
|
* @brief Creates a new kernel mutex.
|
||||||
*
|
*
|
||||||
|
@ -19,17 +19,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a new kernel semaphore.
|
* @brief Creates a new kernel semaphore.
|
||||||
*
|
*
|
||||||
|
@ -21,13 +21,12 @@
|
|||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*KHandle createTimer(bool pulse);
|
/*KHandle createTimer(bool pulse);
|
||||||
|
|
||||||
void deleteTimer(KHandle const ktimer);
|
void deleteTimer(KHandle const ktimer);
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "internal/list.h"
|
#include "internal/list.h"
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "internal/list.h"
|
#include "internal/list.h"
|
||||||
|
@ -16,8 +16,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*#include <stdbool.h>
|
/*#include <stdlib.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "ktimer.h"
|
#include "ktimer.h"
|
||||||
#include "internal/list.h"
|
#include "internal/list.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user