Linux DTrace development list
 help / color / mirror / Atom feed
From: Kris Van Hees <kris.van.hees@oracle.com>
To: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: [PATCH 1/8] list: add dt_list_empty()
Date: Mon, 28 Sep 2026 18:01:54 +0000	[thread overview]
Message-ID: <fc105162c29955947d9ad85ce981a739@oracle.com> (raw)

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
---
 libcommon/dt_list.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libcommon/dt_list.h b/libcommon/dt_list.h
index e6d4c863..ffe0b963 100644
--- a/libcommon/dt_list.h
+++ b/libcommon/dt_list.h
@@ -19,6 +19,7 @@ typedef struct dt_list {
 
 #define	dt_list_prev(elem)	((void *)(((dt_list_t *)(elem))->dl_prev))
 #define	dt_list_next(elem)	((void *)(((dt_list_t *)(elem))->dl_next))
+#define dt_list_empty(elem)	(dt_list_next(elem) == NULL)
 
 #define dt_in_list(l, e)	(dt_list_next(l) == (e) || dt_list_prev(e))
 
-- 
2.52.0


             reply	other threads:[~2026-09-28 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 18:01 Kris Van Hees [this message]
2026-10-03  8:39 ` [DTrace-devel] [PATCH 1/8] list: add dt_list_empty() Elena Zannoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc105162c29955947d9ad85ce981a739@oracle.com \
    --to=kris.van.hees@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox