Merge "Mark fdsan functions as __attribute__((weak))."

am: 1d79043430

Change-Id: I7d5d6014273494e75dc86e3212aee160d687c1b7
This commit is contained in:
Josh Gao 2018-07-20 17:10:26 -07:00 committed by android-build-merger
commit c3ea86bc21

View file

@ -113,21 +113,21 @@ enum android_fdsan_owner_type {
/*
* Create an owner tag with the specified type and least significant 56 bits of tag.
*/
uint64_t android_fdsan_create_owner_tag(enum android_fdsan_owner_type type, uint64_t tag) __INTRODUCED_IN_FUTURE;
uint64_t android_fdsan_create_owner_tag(enum android_fdsan_owner_type type, uint64_t tag) __INTRODUCED_IN_FUTURE __attribute__((__weak__));
/*
* Exchange a file descriptor's tag.
*
* Logs and aborts if the fd's tag does not match expected_tag.
*/
void android_fdsan_exchange_owner_tag(int fd, uint64_t expected_tag, uint64_t new_tag) __INTRODUCED_IN_FUTURE;
void android_fdsan_exchange_owner_tag(int fd, uint64_t expected_tag, uint64_t new_tag) __INTRODUCED_IN_FUTURE __attribute__((__weak__));
/*
* Close a file descriptor with a tag, and resets the tag to 0.
*
* Logs and aborts if the tag is incorrect.
*/
int android_fdsan_close_with_tag(int fd, uint64_t tag) __INTRODUCED_IN_FUTURE;
int android_fdsan_close_with_tag(int fd, uint64_t tag) __INTRODUCED_IN_FUTURE __attribute__((__weak__));
enum android_fdsan_error_level {
// No errors.
@ -146,7 +146,7 @@ enum android_fdsan_error_level {
/*
* Get the error level.
*/
enum android_fdsan_error_level android_fdsan_get_error_level() __INTRODUCED_IN_FUTURE;
enum android_fdsan_error_level android_fdsan_get_error_level() __INTRODUCED_IN_FUTURE __attribute__((__weak__));
/*
* Set the error level and return the previous state.
@ -161,6 +161,6 @@ enum android_fdsan_error_level android_fdsan_get_error_level() __INTRODUCED_IN_F
* value, and so should probably only be called in single-threaded contexts
* (e.g. postfork).
*/
enum android_fdsan_error_level android_fdsan_set_error_level(enum android_fdsan_error_level new_level) __INTRODUCED_IN_FUTURE;
enum android_fdsan_error_level android_fdsan_set_error_level(enum android_fdsan_error_level new_level) __INTRODUCED_IN_FUTURE __attribute__((__weak__));
__END_DECLS