driver: fix public header exceptions for driver

This commit is contained in:
morris
2022-07-20 18:18:47 +08:00
parent 9a921ada7f
commit c4e84751a5
20 changed files with 106 additions and 204 deletions

View File

@@ -6,7 +6,9 @@
#pragma once
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include <assert.h>
#ifdef __cplusplus
extern "C" {
@@ -22,11 +24,11 @@ extern "C" {
* @return true iff [start1; end1) overlaps [start2; end2)
*/
static inline bool bootloader_util_regions_overlap(
const intptr_t start1, const intptr_t end1,
const intptr_t start2, const intptr_t end2)
const intptr_t start1, const intptr_t end1,
const intptr_t start2, const intptr_t end2)
{
assert(end1>start1);
assert(end2>start2);
assert(end1 > start1);
assert(end2 > start2);
return (end1 > start2 && end2 > start1);
}