Changeset c0d814a in mainline for kernel/generic/src/sysinfo/sysinfo.c
- Timestamp:
- 2025-04-10T20:02:30Z (4 days ago)
- Children:
- b8b031f
- Parents:
- a92290d (diff), 90dd8aee (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Wayne Thornton <wmthornton-dev@…> (2025-04-10 20:02:30)
- git-committer:
- GitHub <noreply@…> (2025-04-10 20:02:30)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/sysinfo/sysinfo.c
ra92290d rc0d814a 57 57 58 58 /** Sysinfo lock */ 59 static MUTEX_INITIALIZE(sysinfo_lock, MUTEX_ACTIVE);59 static IRQ_SPINLOCK_INITIALIZE(sysinfo_lock); 60 60 61 61 /** Sysinfo item constructor … … 327 327 { 328 328 /* Protect sysinfo tree consistency */ 329 mutex_lock(&sysinfo_lock);329 irq_spinlock_lock(&sysinfo_lock, true); 330 330 331 331 if (root == NULL) … … 340 340 } 341 341 342 mutex_unlock(&sysinfo_lock);342 irq_spinlock_unlock(&sysinfo_lock, true); 343 343 } 344 344 … … 360 360 { 361 361 /* Protect sysinfo tree consistency */ 362 mutex_lock(&sysinfo_lock);362 irq_spinlock_lock(&sysinfo_lock, true); 363 363 364 364 if (root == NULL) … … 374 374 } 375 375 376 mutex_unlock(&sysinfo_lock);376 irq_spinlock_unlock(&sysinfo_lock, true); 377 377 } 378 378 … … 390 390 { 391 391 /* Protect sysinfo tree consistency */ 392 mutex_lock(&sysinfo_lock);392 irq_spinlock_lock(&sysinfo_lock, true); 393 393 394 394 if (root == NULL) … … 404 404 } 405 405 406 mutex_unlock(&sysinfo_lock);406 irq_spinlock_unlock(&sysinfo_lock, true); 407 407 } 408 408 … … 425 425 { 426 426 /* Protect sysinfo tree consistency */ 427 mutex_lock(&sysinfo_lock);427 irq_spinlock_lock(&sysinfo_lock, true); 428 428 429 429 if (root == NULL) … … 439 439 } 440 440 441 mutex_unlock(&sysinfo_lock);441 irq_spinlock_unlock(&sysinfo_lock, true); 442 442 } 443 443 … … 452 452 { 453 453 /* Protect sysinfo tree consistency */ 454 mutex_lock(&sysinfo_lock);454 irq_spinlock_lock(&sysinfo_lock, true); 455 455 456 456 if (root == NULL) … … 463 463 printf("Could not set sysinfo item %s.\n", name); 464 464 465 mutex_unlock(&sysinfo_lock);465 irq_spinlock_unlock(&sysinfo_lock, true); 466 466 } 467 467 … … 479 479 { 480 480 /* Protect sysinfo tree consistency */ 481 mutex_lock(&sysinfo_lock);481 irq_spinlock_lock(&sysinfo_lock, true); 482 482 483 483 if (root == NULL) … … 498 498 } 499 499 500 mutex_unlock(&sysinfo_lock);500 irq_spinlock_unlock(&sysinfo_lock, true); 501 501 } 502 502 … … 596 596 * while we are dumping it 597 597 */ 598 mutex_lock(&sysinfo_lock);598 irq_spinlock_lock(&sysinfo_lock, true); 599 599 600 600 if (root == NULL) … … 603 603 sysinfo_dump_internal(root, 0); 604 604 605 mutex_unlock(&sysinfo_lock);605 irq_spinlock_unlock(&sysinfo_lock, true); 606 606 } 607 607 … … 695 695 * are reading it. 696 696 */ 697 mutex_lock(&sysinfo_lock);697 irq_spinlock_lock(&sysinfo_lock, true); 698 698 ret = sysinfo_get_item(path, NULL, dry_run); 699 mutex_unlock(&sysinfo_lock);699 irq_spinlock_unlock(&sysinfo_lock, true); 700 700 } 701 701 … … 806 806 * are reading it. 807 807 */ 808 mutex_lock(&sysinfo_lock);808 irq_spinlock_lock(&sysinfo_lock, true); 809 809 ret = sysinfo_get_keys(path, NULL, dry_run); 810 mutex_unlock(&sysinfo_lock);810 irq_spinlock_unlock(&sysinfo_lock, true); 811 811 } 812 812
Note:
See TracChangeset
for help on using the changeset viewer.