summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/stream.h7
-rw-r--r--lib/thread.c3
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/stream.h b/lib/stream.h
index 1048180fac..4d387f9564 100644
--- a/lib/stream.h
+++ b/lib/stream.h
@@ -123,10 +123,15 @@ struct stream_fifo {
#define STREAM_CONCAT_REMAIN(S1, S2, size) ((size) - (S1)->endp - (S2)->endp)
/* deprecated macros - do not use in new code */
+#if CONFDATE > 20181128
+CPP_NOTICE("lib: time to remove deprecated stream.h macros")
+#endif
#define STREAM_PNT(S) stream_pnt((S))
-#define STREAM_DATA(S) ((S)->data)
#define STREAM_REMAIN(S) STREAM_WRITEABLE((S))
+/* this macro is deprecated, but not slated for removal anytime soon */
+#define STREAM_DATA(S) ((S)->data)
+
/* Stream prototypes.
* For stream_{put,get}S, the S suffix mean:
*
diff --git a/lib/thread.c b/lib/thread.c
index cb5d1d47ae..d26db88550 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -1045,7 +1045,8 @@ static void do_thread_cancel(struct thread_master *master)
if (queue) {
assert(thread->index >= 0);
- pqueue_remove(thread, queue);
+ assert(thread == queue->array[thread->index]);
+ pqueue_remove_at(thread->index, queue);
} else if (list) {
thread_list_delete(list, thread);
} else if (thread_array) {