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