1 // SPDX-License-Identifier: GPL-2.0 1 // SPDX-License-Identifier: GPL-2.0 2 2 3 #include <linux/export.h> 3 #include <linux/export.h> 4 #include <linux/refcount.h> 4 #include <linux/refcount.h> 5 5 6 refcount_t rust_helper_REFCOUNT_INIT(int n) 6 refcount_t rust_helper_REFCOUNT_INIT(int n) 7 { 7 { 8 return (refcount_t)REFCOUNT_INIT(n); 8 return (refcount_t)REFCOUNT_INIT(n); 9 } 9 } 10 10 11 void rust_helper_refcount_inc(refcount_t *r) 11 void rust_helper_refcount_inc(refcount_t *r) 12 { 12 { 13 refcount_inc(r); 13 refcount_inc(r); 14 } 14 } 15 15 16 bool rust_helper_refcount_dec_and_test(refcoun 16 bool rust_helper_refcount_dec_and_test(refcount_t *r) 17 { 17 { 18 return refcount_dec_and_test(r); 18 return refcount_dec_and_test(r); 19 } 19 } 20 20
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.