File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ ck_spinlock_clh_lock(struct ck_spinlock_clh **queue, struct ck_spinlock_clh *thr
78
78
* Mark current request as last request. Save reference to previous
79
79
* request.
80
80
*/
81
- previous = ck_pr_fas_ptr (queue , thread );
81
+ previous = CK_CPP_CAST ( struct ck_spinlock_clh * , ck_pr_fas_ptr (queue , thread ) );
82
82
thread -> previous = previous ;
83
83
84
84
/* Wait until previous thread is done with lock. */
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ ck_spinlock_hclh_lock(struct ck_spinlock_hclh **glob_queue,
88
88
ck_pr_fence_store_atomic ();
89
89
90
90
/* Mark current request as last request. Save reference to previous request. */
91
- previous = ck_pr_fas_ptr (local_queue , thread );
91
+ previous = CK_CPP_CAST ( struct ck_spinlock_hclh * , ck_pr_fas_ptr (local_queue , thread ) );
92
92
thread -> previous = previous ;
93
93
94
94
/* Wait until previous thread from the local queue is done with lock. */
@@ -107,7 +107,7 @@ ck_spinlock_hclh_lock(struct ck_spinlock_hclh **glob_queue,
107
107
108
108
/* Now we need to splice the local queue into the global queue. */
109
109
local_tail = ck_pr_load_ptr (local_queue );
110
- previous = ck_pr_fas_ptr (glob_queue , local_tail );
110
+ previous = CK_CPP_CAST ( struct ck_spinlock_hclh * , ck_pr_fas_ptr (glob_queue , local_tail ) );
111
111
112
112
ck_pr_store_uint (& local_tail -> splice , true);
113
113
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ ck_spinlock_mcs_lock(struct ck_spinlock_mcs **queue,
97
97
* returns NULL, it means the queue was empty. If the queue was empty,
98
98
* then the operation is complete.
99
99
*/
100
- previous = ck_pr_fas_ptr (queue , node );
100
+ previous = CK_CPP_CAST ( struct ck_spinlock_mcs * , ck_pr_fas_ptr (queue , node ) );
101
101
if (previous != NULL ) {
102
102
/*
103
103
* Let the previous lock holder know that we are waiting on
You can’t perform that action at this time.
0 commit comments