diff options
-rw-r--r-- | coverity-model.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/coverity-model.c b/coverity-model.c new file mode 100644 index 00000000..b11f3bff --- /dev/null +++ b/coverity-model.c @@ -0,0 +1,23 @@ +void __attribute__((noreturn)) _abort(void) { + __coverity_panic__(); +} + +void *__memalign(size_t blocksize, size_t bytes, const char *location) { + __coverity_alloc__(bytes); +} + +void mem_free(struct mem_region *region, void *mem, const char *location) { + __coverity_free__(mem); +} + +void lock(struct lock *l) { + __coverity_exclusive_lock_acquire__(l); +} + +void unlock(struct lock *l) { + __coverity_exclusive_lock_release__(l); +} + +static inline void cpu_relax(void) { + __coverity_sleep__(); +} |