Skip to content

Commit

Permalink
Unlock TLS spinlock on key error in kthread_setspecific.
Browse files Browse the repository at this point in the history
Thanks to ryancaicse on GitHub for reporting the issue (GitHub Issue #72).
  • Loading branch information
ljsebald committed Mar 13, 2022
1 parent 98cc111 commit 02c5acc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/arch/dreamcast/include/dc/pvr.h
Expand Up @@ -1440,7 +1440,7 @@ void pvr_mem_stats();
/* Scene rendering ***************************************************/

/* This API is used to submit triangle strips to the PVR via the TA
interace in the chip.
interface in the chip.
An important side note about the PVR is that all primitive types
must be submitted grouped together. If you have 10 polygons for each
Expand Down
1 change: 1 addition & 0 deletions kernel/thread/tls.c
Expand Up @@ -134,6 +134,7 @@ int kthread_setspecific(kthread_key_t key, const void *value) {
/* Make sure the key is valid. */
if(key >= next_key || key < 1) {
errno = EINVAL;
spinlock_unlock(&mutex);
return -1;
}

Expand Down

0 comments on commit 02c5acc

Please sign in to comment.