From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Christopher Li <sparse@chrisli.org>
Cc: linux-sparse@vger.kernel.org,
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH v4 3/5] ptrlist: add MARK_CURRENT_DELETED
Date: Sat, 5 Aug 2017 00:17:40 +0200 [thread overview]
Message-ID: <20170804221742.66665-4-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20170804221742.66665-1-luc.vanoostenryck@gmail.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
ptrlist.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/ptrlist.h b/ptrlist.h
index d8203cf0b..74b80e220 100644
--- a/ptrlist.h
+++ b/ptrlist.h
@@ -287,6 +287,14 @@ extern void split_ptr_list_head(struct ptr_list *);
#define REPLACE_CURRENT_PTR(ptr, new_ptr) \
do { *THIS_ADDRESS(ptr) = (new_ptr); } while (0)
+#define DO_MARK_CURRENT_DELETED(ptr, __list) do { \
+ REPLACE_CURRENT_PTR(ptr, NULL); \
+ __list->rm++; \
+ } while (0)
+
+#define MARK_CURRENT_DELETED(ptr) \
+ DO_MARK_CURRENT_DELETED(ptr, __list##ptr)
+
extern void pack_ptr_list(struct ptr_list **);
#define PACK_PTR_LIST(x) pack_ptr_list((struct ptr_list **)(x))
--
2.13.2
next prev parent reply other threads:[~2017-08-04 22:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 22:17 [PATCH v3 0/5] fix list corruption with recursive remove_usage() Luc Van Oostenryck
2017-08-04 22:17 ` [PATCH v4 1/5] ptrlist: add a counter for the number of removed elemnets Luc Van Oostenryck
2017-08-04 22:17 ` [PATCH v4 2/5] ptrlist: adjust ptr_list_size for the new ->rm field Luc Van Oostenryck
2017-08-04 22:17 ` Luc Van Oostenryck [this message]
2017-08-04 22:17 ` [PATCH v4 4/5] ptrlist: avoid iteration on NULL entries Luc Van Oostenryck
2017-08-04 22:17 ` [PATCH v4 5/5] mark pseudo users as deleted instead of removing them Luc Van Oostenryck
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=20170804221742.66665-4-luc.vanoostenryck@gmail.com \
--to=luc.vanoostenryck@gmail.com \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.org \
/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;
as well as URLs for NNTP newsgroup(s).