atomic.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035
  1. // SPDX-License-Identifier: GPL-2.0
  2. // Generated by scripts/atomic/gen-rust-atomic-helpers.sh
  3. // DO NOT MODIFY THIS FILE DIRECTLY
  4. /*
  5. * This file provides helpers for the various atomic functions for Rust.
  6. */
  7. #ifndef _RUST_ATOMIC_API_H
  8. #define _RUST_ATOMIC_API_H
  9. #include <linux/atomic.h>
  10. __rust_helper int
  11. rust_helper_atomic_read(const atomic_t *v)
  12. {
  13. return atomic_read(v);
  14. }
  15. __rust_helper int
  16. rust_helper_atomic_read_acquire(const atomic_t *v)
  17. {
  18. return atomic_read_acquire(v);
  19. }
  20. __rust_helper void
  21. rust_helper_atomic_set(atomic_t *v, int i)
  22. {
  23. atomic_set(v, i);
  24. }
  25. __rust_helper void
  26. rust_helper_atomic_set_release(atomic_t *v, int i)
  27. {
  28. atomic_set_release(v, i);
  29. }
  30. __rust_helper void
  31. rust_helper_atomic_add(int i, atomic_t *v)
  32. {
  33. atomic_add(i, v);
  34. }
  35. __rust_helper int
  36. rust_helper_atomic_add_return(int i, atomic_t *v)
  37. {
  38. return atomic_add_return(i, v);
  39. }
  40. __rust_helper int
  41. rust_helper_atomic_add_return_acquire(int i, atomic_t *v)
  42. {
  43. return atomic_add_return_acquire(i, v);
  44. }
  45. __rust_helper int
  46. rust_helper_atomic_add_return_release(int i, atomic_t *v)
  47. {
  48. return atomic_add_return_release(i, v);
  49. }
  50. __rust_helper int
  51. rust_helper_atomic_add_return_relaxed(int i, atomic_t *v)
  52. {
  53. return atomic_add_return_relaxed(i, v);
  54. }
  55. __rust_helper int
  56. rust_helper_atomic_fetch_add(int i, atomic_t *v)
  57. {
  58. return atomic_fetch_add(i, v);
  59. }
  60. __rust_helper int
  61. rust_helper_atomic_fetch_add_acquire(int i, atomic_t *v)
  62. {
  63. return atomic_fetch_add_acquire(i, v);
  64. }
  65. __rust_helper int
  66. rust_helper_atomic_fetch_add_release(int i, atomic_t *v)
  67. {
  68. return atomic_fetch_add_release(i, v);
  69. }
  70. __rust_helper int
  71. rust_helper_atomic_fetch_add_relaxed(int i, atomic_t *v)
  72. {
  73. return atomic_fetch_add_relaxed(i, v);
  74. }
  75. __rust_helper void
  76. rust_helper_atomic_sub(int i, atomic_t *v)
  77. {
  78. atomic_sub(i, v);
  79. }
  80. __rust_helper int
  81. rust_helper_atomic_sub_return(int i, atomic_t *v)
  82. {
  83. return atomic_sub_return(i, v);
  84. }
  85. __rust_helper int
  86. rust_helper_atomic_sub_return_acquire(int i, atomic_t *v)
  87. {
  88. return atomic_sub_return_acquire(i, v);
  89. }
  90. __rust_helper int
  91. rust_helper_atomic_sub_return_release(int i, atomic_t *v)
  92. {
  93. return atomic_sub_return_release(i, v);
  94. }
  95. __rust_helper int
  96. rust_helper_atomic_sub_return_relaxed(int i, atomic_t *v)
  97. {
  98. return atomic_sub_return_relaxed(i, v);
  99. }
  100. __rust_helper int
  101. rust_helper_atomic_fetch_sub(int i, atomic_t *v)
  102. {
  103. return atomic_fetch_sub(i, v);
  104. }
  105. __rust_helper int
  106. rust_helper_atomic_fetch_sub_acquire(int i, atomic_t *v)
  107. {
  108. return atomic_fetch_sub_acquire(i, v);
  109. }
  110. __rust_helper int
  111. rust_helper_atomic_fetch_sub_release(int i, atomic_t *v)
  112. {
  113. return atomic_fetch_sub_release(i, v);
  114. }
  115. __rust_helper int
  116. rust_helper_atomic_fetch_sub_relaxed(int i, atomic_t *v)
  117. {
  118. return atomic_fetch_sub_relaxed(i, v);
  119. }
  120. __rust_helper void
  121. rust_helper_atomic_inc(atomic_t *v)
  122. {
  123. atomic_inc(v);
  124. }
  125. __rust_helper int
  126. rust_helper_atomic_inc_return(atomic_t *v)
  127. {
  128. return atomic_inc_return(v);
  129. }
  130. __rust_helper int
  131. rust_helper_atomic_inc_return_acquire(atomic_t *v)
  132. {
  133. return atomic_inc_return_acquire(v);
  134. }
  135. __rust_helper int
  136. rust_helper_atomic_inc_return_release(atomic_t *v)
  137. {
  138. return atomic_inc_return_release(v);
  139. }
  140. __rust_helper int
  141. rust_helper_atomic_inc_return_relaxed(atomic_t *v)
  142. {
  143. return atomic_inc_return_relaxed(v);
  144. }
  145. __rust_helper int
  146. rust_helper_atomic_fetch_inc(atomic_t *v)
  147. {
  148. return atomic_fetch_inc(v);
  149. }
  150. __rust_helper int
  151. rust_helper_atomic_fetch_inc_acquire(atomic_t *v)
  152. {
  153. return atomic_fetch_inc_acquire(v);
  154. }
  155. __rust_helper int
  156. rust_helper_atomic_fetch_inc_release(atomic_t *v)
  157. {
  158. return atomic_fetch_inc_release(v);
  159. }
  160. __rust_helper int
  161. rust_helper_atomic_fetch_inc_relaxed(atomic_t *v)
  162. {
  163. return atomic_fetch_inc_relaxed(v);
  164. }
  165. __rust_helper void
  166. rust_helper_atomic_dec(atomic_t *v)
  167. {
  168. atomic_dec(v);
  169. }
  170. __rust_helper int
  171. rust_helper_atomic_dec_return(atomic_t *v)
  172. {
  173. return atomic_dec_return(v);
  174. }
  175. __rust_helper int
  176. rust_helper_atomic_dec_return_acquire(atomic_t *v)
  177. {
  178. return atomic_dec_return_acquire(v);
  179. }
  180. __rust_helper int
  181. rust_helper_atomic_dec_return_release(atomic_t *v)
  182. {
  183. return atomic_dec_return_release(v);
  184. }
  185. __rust_helper int
  186. rust_helper_atomic_dec_return_relaxed(atomic_t *v)
  187. {
  188. return atomic_dec_return_relaxed(v);
  189. }
  190. __rust_helper int
  191. rust_helper_atomic_fetch_dec(atomic_t *v)
  192. {
  193. return atomic_fetch_dec(v);
  194. }
  195. __rust_helper int
  196. rust_helper_atomic_fetch_dec_acquire(atomic_t *v)
  197. {
  198. return atomic_fetch_dec_acquire(v);
  199. }
  200. __rust_helper int
  201. rust_helper_atomic_fetch_dec_release(atomic_t *v)
  202. {
  203. return atomic_fetch_dec_release(v);
  204. }
  205. __rust_helper int
  206. rust_helper_atomic_fetch_dec_relaxed(atomic_t *v)
  207. {
  208. return atomic_fetch_dec_relaxed(v);
  209. }
  210. __rust_helper void
  211. rust_helper_atomic_and(int i, atomic_t *v)
  212. {
  213. atomic_and(i, v);
  214. }
  215. __rust_helper int
  216. rust_helper_atomic_fetch_and(int i, atomic_t *v)
  217. {
  218. return atomic_fetch_and(i, v);
  219. }
  220. __rust_helper int
  221. rust_helper_atomic_fetch_and_acquire(int i, atomic_t *v)
  222. {
  223. return atomic_fetch_and_acquire(i, v);
  224. }
  225. __rust_helper int
  226. rust_helper_atomic_fetch_and_release(int i, atomic_t *v)
  227. {
  228. return atomic_fetch_and_release(i, v);
  229. }
  230. __rust_helper int
  231. rust_helper_atomic_fetch_and_relaxed(int i, atomic_t *v)
  232. {
  233. return atomic_fetch_and_relaxed(i, v);
  234. }
  235. __rust_helper void
  236. rust_helper_atomic_andnot(int i, atomic_t *v)
  237. {
  238. atomic_andnot(i, v);
  239. }
  240. __rust_helper int
  241. rust_helper_atomic_fetch_andnot(int i, atomic_t *v)
  242. {
  243. return atomic_fetch_andnot(i, v);
  244. }
  245. __rust_helper int
  246. rust_helper_atomic_fetch_andnot_acquire(int i, atomic_t *v)
  247. {
  248. return atomic_fetch_andnot_acquire(i, v);
  249. }
  250. __rust_helper int
  251. rust_helper_atomic_fetch_andnot_release(int i, atomic_t *v)
  252. {
  253. return atomic_fetch_andnot_release(i, v);
  254. }
  255. __rust_helper int
  256. rust_helper_atomic_fetch_andnot_relaxed(int i, atomic_t *v)
  257. {
  258. return atomic_fetch_andnot_relaxed(i, v);
  259. }
  260. __rust_helper void
  261. rust_helper_atomic_or(int i, atomic_t *v)
  262. {
  263. atomic_or(i, v);
  264. }
  265. __rust_helper int
  266. rust_helper_atomic_fetch_or(int i, atomic_t *v)
  267. {
  268. return atomic_fetch_or(i, v);
  269. }
  270. __rust_helper int
  271. rust_helper_atomic_fetch_or_acquire(int i, atomic_t *v)
  272. {
  273. return atomic_fetch_or_acquire(i, v);
  274. }
  275. __rust_helper int
  276. rust_helper_atomic_fetch_or_release(int i, atomic_t *v)
  277. {
  278. return atomic_fetch_or_release(i, v);
  279. }
  280. __rust_helper int
  281. rust_helper_atomic_fetch_or_relaxed(int i, atomic_t *v)
  282. {
  283. return atomic_fetch_or_relaxed(i, v);
  284. }
  285. __rust_helper void
  286. rust_helper_atomic_xor(int i, atomic_t *v)
  287. {
  288. atomic_xor(i, v);
  289. }
  290. __rust_helper int
  291. rust_helper_atomic_fetch_xor(int i, atomic_t *v)
  292. {
  293. return atomic_fetch_xor(i, v);
  294. }
  295. __rust_helper int
  296. rust_helper_atomic_fetch_xor_acquire(int i, atomic_t *v)
  297. {
  298. return atomic_fetch_xor_acquire(i, v);
  299. }
  300. __rust_helper int
  301. rust_helper_atomic_fetch_xor_release(int i, atomic_t *v)
  302. {
  303. return atomic_fetch_xor_release(i, v);
  304. }
  305. __rust_helper int
  306. rust_helper_atomic_fetch_xor_relaxed(int i, atomic_t *v)
  307. {
  308. return atomic_fetch_xor_relaxed(i, v);
  309. }
  310. __rust_helper int
  311. rust_helper_atomic_xchg(atomic_t *v, int new)
  312. {
  313. return atomic_xchg(v, new);
  314. }
  315. __rust_helper int
  316. rust_helper_atomic_xchg_acquire(atomic_t *v, int new)
  317. {
  318. return atomic_xchg_acquire(v, new);
  319. }
  320. __rust_helper int
  321. rust_helper_atomic_xchg_release(atomic_t *v, int new)
  322. {
  323. return atomic_xchg_release(v, new);
  324. }
  325. __rust_helper int
  326. rust_helper_atomic_xchg_relaxed(atomic_t *v, int new)
  327. {
  328. return atomic_xchg_relaxed(v, new);
  329. }
  330. __rust_helper int
  331. rust_helper_atomic_cmpxchg(atomic_t *v, int old, int new)
  332. {
  333. return atomic_cmpxchg(v, old, new);
  334. }
  335. __rust_helper int
  336. rust_helper_atomic_cmpxchg_acquire(atomic_t *v, int old, int new)
  337. {
  338. return atomic_cmpxchg_acquire(v, old, new);
  339. }
  340. __rust_helper int
  341. rust_helper_atomic_cmpxchg_release(atomic_t *v, int old, int new)
  342. {
  343. return atomic_cmpxchg_release(v, old, new);
  344. }
  345. __rust_helper int
  346. rust_helper_atomic_cmpxchg_relaxed(atomic_t *v, int old, int new)
  347. {
  348. return atomic_cmpxchg_relaxed(v, old, new);
  349. }
  350. __rust_helper bool
  351. rust_helper_atomic_try_cmpxchg(atomic_t *v, int *old, int new)
  352. {
  353. return atomic_try_cmpxchg(v, old, new);
  354. }
  355. __rust_helper bool
  356. rust_helper_atomic_try_cmpxchg_acquire(atomic_t *v, int *old, int new)
  357. {
  358. return atomic_try_cmpxchg_acquire(v, old, new);
  359. }
  360. __rust_helper bool
  361. rust_helper_atomic_try_cmpxchg_release(atomic_t *v, int *old, int new)
  362. {
  363. return atomic_try_cmpxchg_release(v, old, new);
  364. }
  365. __rust_helper bool
  366. rust_helper_atomic_try_cmpxchg_relaxed(atomic_t *v, int *old, int new)
  367. {
  368. return atomic_try_cmpxchg_relaxed(v, old, new);
  369. }
  370. __rust_helper bool
  371. rust_helper_atomic_sub_and_test(int i, atomic_t *v)
  372. {
  373. return atomic_sub_and_test(i, v);
  374. }
  375. __rust_helper bool
  376. rust_helper_atomic_dec_and_test(atomic_t *v)
  377. {
  378. return atomic_dec_and_test(v);
  379. }
  380. __rust_helper bool
  381. rust_helper_atomic_inc_and_test(atomic_t *v)
  382. {
  383. return atomic_inc_and_test(v);
  384. }
  385. __rust_helper bool
  386. rust_helper_atomic_add_negative(int i, atomic_t *v)
  387. {
  388. return atomic_add_negative(i, v);
  389. }
  390. __rust_helper bool
  391. rust_helper_atomic_add_negative_acquire(int i, atomic_t *v)
  392. {
  393. return atomic_add_negative_acquire(i, v);
  394. }
  395. __rust_helper bool
  396. rust_helper_atomic_add_negative_release(int i, atomic_t *v)
  397. {
  398. return atomic_add_negative_release(i, v);
  399. }
  400. __rust_helper bool
  401. rust_helper_atomic_add_negative_relaxed(int i, atomic_t *v)
  402. {
  403. return atomic_add_negative_relaxed(i, v);
  404. }
  405. __rust_helper int
  406. rust_helper_atomic_fetch_add_unless(atomic_t *v, int a, int u)
  407. {
  408. return atomic_fetch_add_unless(v, a, u);
  409. }
  410. __rust_helper bool
  411. rust_helper_atomic_add_unless(atomic_t *v, int a, int u)
  412. {
  413. return atomic_add_unless(v, a, u);
  414. }
  415. __rust_helper bool
  416. rust_helper_atomic_inc_not_zero(atomic_t *v)
  417. {
  418. return atomic_inc_not_zero(v);
  419. }
  420. __rust_helper bool
  421. rust_helper_atomic_inc_unless_negative(atomic_t *v)
  422. {
  423. return atomic_inc_unless_negative(v);
  424. }
  425. __rust_helper bool
  426. rust_helper_atomic_dec_unless_positive(atomic_t *v)
  427. {
  428. return atomic_dec_unless_positive(v);
  429. }
  430. __rust_helper int
  431. rust_helper_atomic_dec_if_positive(atomic_t *v)
  432. {
  433. return atomic_dec_if_positive(v);
  434. }
  435. __rust_helper s64
  436. rust_helper_atomic64_read(const atomic64_t *v)
  437. {
  438. return atomic64_read(v);
  439. }
  440. __rust_helper s64
  441. rust_helper_atomic64_read_acquire(const atomic64_t *v)
  442. {
  443. return atomic64_read_acquire(v);
  444. }
  445. __rust_helper void
  446. rust_helper_atomic64_set(atomic64_t *v, s64 i)
  447. {
  448. atomic64_set(v, i);
  449. }
  450. __rust_helper void
  451. rust_helper_atomic64_set_release(atomic64_t *v, s64 i)
  452. {
  453. atomic64_set_release(v, i);
  454. }
  455. __rust_helper void
  456. rust_helper_atomic64_add(s64 i, atomic64_t *v)
  457. {
  458. atomic64_add(i, v);
  459. }
  460. __rust_helper s64
  461. rust_helper_atomic64_add_return(s64 i, atomic64_t *v)
  462. {
  463. return atomic64_add_return(i, v);
  464. }
  465. __rust_helper s64
  466. rust_helper_atomic64_add_return_acquire(s64 i, atomic64_t *v)
  467. {
  468. return atomic64_add_return_acquire(i, v);
  469. }
  470. __rust_helper s64
  471. rust_helper_atomic64_add_return_release(s64 i, atomic64_t *v)
  472. {
  473. return atomic64_add_return_release(i, v);
  474. }
  475. __rust_helper s64
  476. rust_helper_atomic64_add_return_relaxed(s64 i, atomic64_t *v)
  477. {
  478. return atomic64_add_return_relaxed(i, v);
  479. }
  480. __rust_helper s64
  481. rust_helper_atomic64_fetch_add(s64 i, atomic64_t *v)
  482. {
  483. return atomic64_fetch_add(i, v);
  484. }
  485. __rust_helper s64
  486. rust_helper_atomic64_fetch_add_acquire(s64 i, atomic64_t *v)
  487. {
  488. return atomic64_fetch_add_acquire(i, v);
  489. }
  490. __rust_helper s64
  491. rust_helper_atomic64_fetch_add_release(s64 i, atomic64_t *v)
  492. {
  493. return atomic64_fetch_add_release(i, v);
  494. }
  495. __rust_helper s64
  496. rust_helper_atomic64_fetch_add_relaxed(s64 i, atomic64_t *v)
  497. {
  498. return atomic64_fetch_add_relaxed(i, v);
  499. }
  500. __rust_helper void
  501. rust_helper_atomic64_sub(s64 i, atomic64_t *v)
  502. {
  503. atomic64_sub(i, v);
  504. }
  505. __rust_helper s64
  506. rust_helper_atomic64_sub_return(s64 i, atomic64_t *v)
  507. {
  508. return atomic64_sub_return(i, v);
  509. }
  510. __rust_helper s64
  511. rust_helper_atomic64_sub_return_acquire(s64 i, atomic64_t *v)
  512. {
  513. return atomic64_sub_return_acquire(i, v);
  514. }
  515. __rust_helper s64
  516. rust_helper_atomic64_sub_return_release(s64 i, atomic64_t *v)
  517. {
  518. return atomic64_sub_return_release(i, v);
  519. }
  520. __rust_helper s64
  521. rust_helper_atomic64_sub_return_relaxed(s64 i, atomic64_t *v)
  522. {
  523. return atomic64_sub_return_relaxed(i, v);
  524. }
  525. __rust_helper s64
  526. rust_helper_atomic64_fetch_sub(s64 i, atomic64_t *v)
  527. {
  528. return atomic64_fetch_sub(i, v);
  529. }
  530. __rust_helper s64
  531. rust_helper_atomic64_fetch_sub_acquire(s64 i, atomic64_t *v)
  532. {
  533. return atomic64_fetch_sub_acquire(i, v);
  534. }
  535. __rust_helper s64
  536. rust_helper_atomic64_fetch_sub_release(s64 i, atomic64_t *v)
  537. {
  538. return atomic64_fetch_sub_release(i, v);
  539. }
  540. __rust_helper s64
  541. rust_helper_atomic64_fetch_sub_relaxed(s64 i, atomic64_t *v)
  542. {
  543. return atomic64_fetch_sub_relaxed(i, v);
  544. }
  545. __rust_helper void
  546. rust_helper_atomic64_inc(atomic64_t *v)
  547. {
  548. atomic64_inc(v);
  549. }
  550. __rust_helper s64
  551. rust_helper_atomic64_inc_return(atomic64_t *v)
  552. {
  553. return atomic64_inc_return(v);
  554. }
  555. __rust_helper s64
  556. rust_helper_atomic64_inc_return_acquire(atomic64_t *v)
  557. {
  558. return atomic64_inc_return_acquire(v);
  559. }
  560. __rust_helper s64
  561. rust_helper_atomic64_inc_return_release(atomic64_t *v)
  562. {
  563. return atomic64_inc_return_release(v);
  564. }
  565. __rust_helper s64
  566. rust_helper_atomic64_inc_return_relaxed(atomic64_t *v)
  567. {
  568. return atomic64_inc_return_relaxed(v);
  569. }
  570. __rust_helper s64
  571. rust_helper_atomic64_fetch_inc(atomic64_t *v)
  572. {
  573. return atomic64_fetch_inc(v);
  574. }
  575. __rust_helper s64
  576. rust_helper_atomic64_fetch_inc_acquire(atomic64_t *v)
  577. {
  578. return atomic64_fetch_inc_acquire(v);
  579. }
  580. __rust_helper s64
  581. rust_helper_atomic64_fetch_inc_release(atomic64_t *v)
  582. {
  583. return atomic64_fetch_inc_release(v);
  584. }
  585. __rust_helper s64
  586. rust_helper_atomic64_fetch_inc_relaxed(atomic64_t *v)
  587. {
  588. return atomic64_fetch_inc_relaxed(v);
  589. }
  590. __rust_helper void
  591. rust_helper_atomic64_dec(atomic64_t *v)
  592. {
  593. atomic64_dec(v);
  594. }
  595. __rust_helper s64
  596. rust_helper_atomic64_dec_return(atomic64_t *v)
  597. {
  598. return atomic64_dec_return(v);
  599. }
  600. __rust_helper s64
  601. rust_helper_atomic64_dec_return_acquire(atomic64_t *v)
  602. {
  603. return atomic64_dec_return_acquire(v);
  604. }
  605. __rust_helper s64
  606. rust_helper_atomic64_dec_return_release(atomic64_t *v)
  607. {
  608. return atomic64_dec_return_release(v);
  609. }
  610. __rust_helper s64
  611. rust_helper_atomic64_dec_return_relaxed(atomic64_t *v)
  612. {
  613. return atomic64_dec_return_relaxed(v);
  614. }
  615. __rust_helper s64
  616. rust_helper_atomic64_fetch_dec(atomic64_t *v)
  617. {
  618. return atomic64_fetch_dec(v);
  619. }
  620. __rust_helper s64
  621. rust_helper_atomic64_fetch_dec_acquire(atomic64_t *v)
  622. {
  623. return atomic64_fetch_dec_acquire(v);
  624. }
  625. __rust_helper s64
  626. rust_helper_atomic64_fetch_dec_release(atomic64_t *v)
  627. {
  628. return atomic64_fetch_dec_release(v);
  629. }
  630. __rust_helper s64
  631. rust_helper_atomic64_fetch_dec_relaxed(atomic64_t *v)
  632. {
  633. return atomic64_fetch_dec_relaxed(v);
  634. }
  635. __rust_helper void
  636. rust_helper_atomic64_and(s64 i, atomic64_t *v)
  637. {
  638. atomic64_and(i, v);
  639. }
  640. __rust_helper s64
  641. rust_helper_atomic64_fetch_and(s64 i, atomic64_t *v)
  642. {
  643. return atomic64_fetch_and(i, v);
  644. }
  645. __rust_helper s64
  646. rust_helper_atomic64_fetch_and_acquire(s64 i, atomic64_t *v)
  647. {
  648. return atomic64_fetch_and_acquire(i, v);
  649. }
  650. __rust_helper s64
  651. rust_helper_atomic64_fetch_and_release(s64 i, atomic64_t *v)
  652. {
  653. return atomic64_fetch_and_release(i, v);
  654. }
  655. __rust_helper s64
  656. rust_helper_atomic64_fetch_and_relaxed(s64 i, atomic64_t *v)
  657. {
  658. return atomic64_fetch_and_relaxed(i, v);
  659. }
  660. __rust_helper void
  661. rust_helper_atomic64_andnot(s64 i, atomic64_t *v)
  662. {
  663. atomic64_andnot(i, v);
  664. }
  665. __rust_helper s64
  666. rust_helper_atomic64_fetch_andnot(s64 i, atomic64_t *v)
  667. {
  668. return atomic64_fetch_andnot(i, v);
  669. }
  670. __rust_helper s64
  671. rust_helper_atomic64_fetch_andnot_acquire(s64 i, atomic64_t *v)
  672. {
  673. return atomic64_fetch_andnot_acquire(i, v);
  674. }
  675. __rust_helper s64
  676. rust_helper_atomic64_fetch_andnot_release(s64 i, atomic64_t *v)
  677. {
  678. return atomic64_fetch_andnot_release(i, v);
  679. }
  680. __rust_helper s64
  681. rust_helper_atomic64_fetch_andnot_relaxed(s64 i, atomic64_t *v)
  682. {
  683. return atomic64_fetch_andnot_relaxed(i, v);
  684. }
  685. __rust_helper void
  686. rust_helper_atomic64_or(s64 i, atomic64_t *v)
  687. {
  688. atomic64_or(i, v);
  689. }
  690. __rust_helper s64
  691. rust_helper_atomic64_fetch_or(s64 i, atomic64_t *v)
  692. {
  693. return atomic64_fetch_or(i, v);
  694. }
  695. __rust_helper s64
  696. rust_helper_atomic64_fetch_or_acquire(s64 i, atomic64_t *v)
  697. {
  698. return atomic64_fetch_or_acquire(i, v);
  699. }
  700. __rust_helper s64
  701. rust_helper_atomic64_fetch_or_release(s64 i, atomic64_t *v)
  702. {
  703. return atomic64_fetch_or_release(i, v);
  704. }
  705. __rust_helper s64
  706. rust_helper_atomic64_fetch_or_relaxed(s64 i, atomic64_t *v)
  707. {
  708. return atomic64_fetch_or_relaxed(i, v);
  709. }
  710. __rust_helper void
  711. rust_helper_atomic64_xor(s64 i, atomic64_t *v)
  712. {
  713. atomic64_xor(i, v);
  714. }
  715. __rust_helper s64
  716. rust_helper_atomic64_fetch_xor(s64 i, atomic64_t *v)
  717. {
  718. return atomic64_fetch_xor(i, v);
  719. }
  720. __rust_helper s64
  721. rust_helper_atomic64_fetch_xor_acquire(s64 i, atomic64_t *v)
  722. {
  723. return atomic64_fetch_xor_acquire(i, v);
  724. }
  725. __rust_helper s64
  726. rust_helper_atomic64_fetch_xor_release(s64 i, atomic64_t *v)
  727. {
  728. return atomic64_fetch_xor_release(i, v);
  729. }
  730. __rust_helper s64
  731. rust_helper_atomic64_fetch_xor_relaxed(s64 i, atomic64_t *v)
  732. {
  733. return atomic64_fetch_xor_relaxed(i, v);
  734. }
  735. __rust_helper s64
  736. rust_helper_atomic64_xchg(atomic64_t *v, s64 new)
  737. {
  738. return atomic64_xchg(v, new);
  739. }
  740. __rust_helper s64
  741. rust_helper_atomic64_xchg_acquire(atomic64_t *v, s64 new)
  742. {
  743. return atomic64_xchg_acquire(v, new);
  744. }
  745. __rust_helper s64
  746. rust_helper_atomic64_xchg_release(atomic64_t *v, s64 new)
  747. {
  748. return atomic64_xchg_release(v, new);
  749. }
  750. __rust_helper s64
  751. rust_helper_atomic64_xchg_relaxed(atomic64_t *v, s64 new)
  752. {
  753. return atomic64_xchg_relaxed(v, new);
  754. }
  755. __rust_helper s64
  756. rust_helper_atomic64_cmpxchg(atomic64_t *v, s64 old, s64 new)
  757. {
  758. return atomic64_cmpxchg(v, old, new);
  759. }
  760. __rust_helper s64
  761. rust_helper_atomic64_cmpxchg_acquire(atomic64_t *v, s64 old, s64 new)
  762. {
  763. return atomic64_cmpxchg_acquire(v, old, new);
  764. }
  765. __rust_helper s64
  766. rust_helper_atomic64_cmpxchg_release(atomic64_t *v, s64 old, s64 new)
  767. {
  768. return atomic64_cmpxchg_release(v, old, new);
  769. }
  770. __rust_helper s64
  771. rust_helper_atomic64_cmpxchg_relaxed(atomic64_t *v, s64 old, s64 new)
  772. {
  773. return atomic64_cmpxchg_relaxed(v, old, new);
  774. }
  775. __rust_helper bool
  776. rust_helper_atomic64_try_cmpxchg(atomic64_t *v, s64 *old, s64 new)
  777. {
  778. return atomic64_try_cmpxchg(v, old, new);
  779. }
  780. __rust_helper bool
  781. rust_helper_atomic64_try_cmpxchg_acquire(atomic64_t *v, s64 *old, s64 new)
  782. {
  783. return atomic64_try_cmpxchg_acquire(v, old, new);
  784. }
  785. __rust_helper bool
  786. rust_helper_atomic64_try_cmpxchg_release(atomic64_t *v, s64 *old, s64 new)
  787. {
  788. return atomic64_try_cmpxchg_release(v, old, new);
  789. }
  790. __rust_helper bool
  791. rust_helper_atomic64_try_cmpxchg_relaxed(atomic64_t *v, s64 *old, s64 new)
  792. {
  793. return atomic64_try_cmpxchg_relaxed(v, old, new);
  794. }
  795. __rust_helper bool
  796. rust_helper_atomic64_sub_and_test(s64 i, atomic64_t *v)
  797. {
  798. return atomic64_sub_and_test(i, v);
  799. }
  800. __rust_helper bool
  801. rust_helper_atomic64_dec_and_test(atomic64_t *v)
  802. {
  803. return atomic64_dec_and_test(v);
  804. }
  805. __rust_helper bool
  806. rust_helper_atomic64_inc_and_test(atomic64_t *v)
  807. {
  808. return atomic64_inc_and_test(v);
  809. }
  810. __rust_helper bool
  811. rust_helper_atomic64_add_negative(s64 i, atomic64_t *v)
  812. {
  813. return atomic64_add_negative(i, v);
  814. }
  815. __rust_helper bool
  816. rust_helper_atomic64_add_negative_acquire(s64 i, atomic64_t *v)
  817. {
  818. return atomic64_add_negative_acquire(i, v);
  819. }
  820. __rust_helper bool
  821. rust_helper_atomic64_add_negative_release(s64 i, atomic64_t *v)
  822. {
  823. return atomic64_add_negative_release(i, v);
  824. }
  825. __rust_helper bool
  826. rust_helper_atomic64_add_negative_relaxed(s64 i, atomic64_t *v)
  827. {
  828. return atomic64_add_negative_relaxed(i, v);
  829. }
  830. __rust_helper s64
  831. rust_helper_atomic64_fetch_add_unless(atomic64_t *v, s64 a, s64 u)
  832. {
  833. return atomic64_fetch_add_unless(v, a, u);
  834. }
  835. __rust_helper bool
  836. rust_helper_atomic64_add_unless(atomic64_t *v, s64 a, s64 u)
  837. {
  838. return atomic64_add_unless(v, a, u);
  839. }
  840. __rust_helper bool
  841. rust_helper_atomic64_inc_not_zero(atomic64_t *v)
  842. {
  843. return atomic64_inc_not_zero(v);
  844. }
  845. __rust_helper bool
  846. rust_helper_atomic64_inc_unless_negative(atomic64_t *v)
  847. {
  848. return atomic64_inc_unless_negative(v);
  849. }
  850. __rust_helper bool
  851. rust_helper_atomic64_dec_unless_positive(atomic64_t *v)
  852. {
  853. return atomic64_dec_unless_positive(v);
  854. }
  855. __rust_helper s64
  856. rust_helper_atomic64_dec_if_positive(atomic64_t *v)
  857. {
  858. return atomic64_dec_if_positive(v);
  859. }
  860. #endif /* _RUST_ATOMIC_API_H */
  861. // e4edb6174dd42a265284958f00a7cea7ddb464b1