diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-11-18 15:03:44 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-11-18 15:03:44 +1100 |
commit | 79e829c68f245f68338017e0b3c1777087a44ec1 (patch) | |
tree | c33708d06ed15e3ce5ea951187c9b8d3c29fe530 /coverity-model.c | |
parent | 2ee30fc6b5aec369934b83126b29f37960487cbe (diff) | |
download | skiboot-79e829c68f245f68338017e0b3c1777087a44ec1.zip skiboot-79e829c68f245f68338017e0b3c1777087a44ec1.tar.gz skiboot-79e829c68f245f68338017e0b3c1777087a44ec1.tar.bz2 |
Add coverity model
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'coverity-model.c')
-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 0000000..b11f3bf --- /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__(); +} |