diff options
| author | Shell <[email protected]> | 2024-02-23 17:49:15 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-23 17:49:15 +0800 |
| commit | 71560bafb5735220696ca24a42ba4a668b55949b (patch) | |
| tree | 236df5973a1fd5b6f0cc9f6c6b6a2d71fd069203 /components/mm | |
| parent | 6fe69d7431ed54fcea863ed68d7c4f9746e771b0 (diff) | |
🎯 Sync smart & scheduler codes (#8537)
Signed-off-by: Shell <[email protected]>
Co-authored-by: xqyjlj <[email protected]>
Diffstat (limited to 'components/mm')
| -rw-r--r-- | components/mm/mm_aspace.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/components/mm/mm_aspace.h b/components/mm/mm_aspace.h index b5356253b0..ff1429c305 100644 --- a/components/mm/mm_aspace.h +++ b/components/mm/mm_aspace.h @@ -25,22 +25,12 @@ #define MM_PA_TO_OFF(pa) ((uintptr_t)(pa) >> MM_PAGE_SHIFT) #define PV_OFFSET (rt_kmem_pvoff()) -#ifndef RT_USING_SMP -typedef rt_spinlock_t mm_spinlock; - -#define MM_PGTBL_LOCK_INIT(aspace) -#define MM_PGTBL_LOCK(aspace) (rt_hw_spin_lock(&((aspace)->pgtbl_lock))) -#define MM_PGTBL_UNLOCK(aspace) (rt_hw_spin_unlock(&((aspace)->pgtbl_lock))) - -#else -typedef struct rt_spinlock mm_spinlock; +typedef struct rt_spinlock mm_spinlock_t; #define MM_PGTBL_LOCK_INIT(aspace) (rt_spin_lock_init(&((aspace)->pgtbl_lock))) #define MM_PGTBL_LOCK(aspace) (rt_spin_lock(&((aspace)->pgtbl_lock))) #define MM_PGTBL_UNLOCK(aspace) (rt_spin_unlock(&((aspace)->pgtbl_lock))) -#endif /* RT_USING_SMP */ - struct rt_aspace; struct rt_varea; struct rt_mem_obj; @@ -53,7 +43,7 @@ typedef struct rt_aspace rt_size_t size; void *page_table; - mm_spinlock pgtbl_lock; + mm_spinlock_t pgtbl_lock; struct _aspace_tree tree; struct rt_mutex bst_lock; |
