Changeset fc81981 in mainline
- Timestamp:
- 2010-06-25T14:49:42Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- decfbe56
- Parents:
- 33c4f72
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/include/interrupt.h
r33c4f72 rfc81981 54 54 55 55 static inline int istate_from_uspace(istate_t *istate) 56 REQUIRES_EXTENT_MUTABLE(istate) 56 57 { 57 58 /* On real hardware this checks whether the interrupted … … 62 63 63 64 static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr) 65 WRITES(&istate->ip) 64 66 { 65 67 /* On real hardware this sets the instruction pointer. */ … … 69 71 70 72 static inline unative_t istate_get_pc(istate_t *istate) 73 REQUIRES_EXTENT_MUTABLE(istate) 71 74 { 72 75 /* On real hardware this returns the instruction pointer. */ … … 76 79 77 80 static inline unative_t istate_get_fp(istate_t *istate) 81 REQUIRES_EXTENT_MUTABLE(istate) 78 82 { 79 83 /* On real hardware this returns the frame pointer. */ -
kernel/arch/abs32le/include/mm/page.h
r33c4f72 rfc81981 140 140 141 141 static inline unsigned int get_pt_flags(pte_t *pt, size_t i) 142 REQUIRES_ARRAY_MUTABLE(pt, PTL0_ENTRIES_ARCH) 142 143 { 143 144 pte_t *p = &pt[i]; … … 155 156 156 157 static inline void set_pt_flags(pte_t *pt, size_t i, int flags) 158 WRITES(ARRAY_RANGE(pt, PTL0_ENTRIES_ARCH)) 159 REQUIRES_ARRAY_MUTABLE(pt, PTL0_ENTRIES_ARCH) 157 160 { 158 161 pte_t *p = &pt[i]; -
kernel/generic/include/verify.h
r33c4f72 rfc81981 40 40 41 41 #define ATOMIC __specification_attr("atomic_inline", "") 42 #define READS(...) __specification(reads(__VA_ARGS__)) 43 #define WRITES(...) __specification(writes(__VA_ARGS__)) 42 43 #define READS(ptr) __specification(reads(ptr)) 44 #define WRITES(ptr) __specification(writes(ptr)) 44 45 #define REQUIRES(...) __specification(requires __VA_ARGS__) 45 46 46 #define REQUIRES_EXTENT_MUTABLE(...) \ 47 REQUIRES(\extent_mutable(__VA_ARGS__)) 47 #define EXTENT(ptr) \extent(ptr) 48 #define ARRAY_RANGE(ptr, nmemb) \array_range(ptr, nmemb) 49 50 #define REQUIRES_EXTENT_MUTABLE(ptr) \ 51 REQUIRES(\extent_mutable(ptr)) 52 53 #define REQUIRES_ARRAY_MUTABLE(ptr, nmemb) \ 54 REQUIRES(\mutable_array(ptr, nmemb)) 48 55 49 56 #else /* CONFIG_VERIFY_VCC */ 50 57 51 58 #define ATOMIC 52 #define READS(...) 53 #define WRITES(...) 59 60 #define READS(ptr) 61 #define WRITES(ptr) 54 62 #define REQUIRES(...) 55 63 56 #define REQUIRES_EXTENT_MUTABLE(...) 64 #define EXTENT(ptr) 65 #define ARRAY_RANGE(ptr, nmemb) 66 67 #define REQUIRES_EXTENT_MUTABLE(ptr) 68 #define REQUIRES_ARRAY_MUTABLE(ptr, nmemb) 57 69 58 70 #endif /* CONFIG_VERIFY_VCC */ -
tools/checkers/vcc.h
r33c4f72 rfc81981 54 54 __specification(typedef void * \object;) 55 55 __specification(typedef __int64 \integer;) 56 __specification(typedef unsigned __int64 \size_t;) 56 57 57 58 __specification_type(objset) … … 66 67 67 68 __specification(bool \extent_mutable(\object);) 69 __specification(\objset \extent(\object);) 70 __specification(\objset \array_range(\object, \size_t);) 71 __specification(bool \mutable_array(\object, \size_t);) 68 72 69 73 #endif
Note:
See TracChangeset
for help on using the changeset viewer.