[DTrace-devel] [PATCH 1/8] list: add dt_list_empty()

Elena Zannoni elena.zannoni at oracle.com
Sat Oct 3 08:39:03 UTC 2026


Reviewed-by: Elena Zannoni <elena.zannoni at oracle.com>


On 9/28/26 12:01 PM, Kris Van Hees via DTrace-devel wrote:

> 
> Signed-off-by: Kris Van Hees <kris.van.hees at 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
> 
> 
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel
> 




More information about the DTrace-devel mailing list