Skip to content

core: priority_queue: simplify inheritance#1639

Merged
LudwigKnuepfer merged 1 commit intoRIOT-OS:masterfrom
miri64:simplify_queue_inheritance
Sep 10, 2014
Merged

core: priority_queue: simplify inheritance#1639
LudwigKnuepfer merged 1 commit intoRIOT-OS:masterfrom
miri64:simplify_queue_inheritance

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Sep 5, 2014

If data is last, it can get as big as someone who wants to extend the priority queue likes to.

@Kijewski
Copy link
Copy Markdown
Contributor

Kijewski commented Sep 5, 2014

Maybe you could try to remove the member data from the datatype? Compare clist.h.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 6, 2014

For this I have to understand the magic you did there ;-)

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 6, 2014

For now I prefer this small patch.

@Kijewski
Copy link
Copy Markdown
Contributor

Kijewski commented Sep 6, 2014

OK, ACK.

@miri64 miri64 assigned LudwigKnuepfer and unassigned Kijewski Sep 6, 2014
@LudwigKnuepfer
Copy link
Copy Markdown
Member

Is it possible that this breaks the vtimer? If I remember right, it already "extends" priority_queue_node_t.

@Kijewski
Copy link
Copy Markdown
Contributor

Kijewski commented Sep 6, 2014

No, vtimer_t just uses it as a proper member.

@LudwigKnuepfer
Copy link
Copy Markdown
Member

@Kijewski
Copy link
Copy Markdown
Contributor

Kijewski commented Sep 6, 2014

This line should be

priority_queue_add(&longterm_priority_queue_root, &timer->priority_queue_entry);

Likewise in all the other instances.

@LudwigKnuepfer
Copy link
Copy Markdown
Member

WTF. Will you create a PR for this?

@Kijewski
Copy link
Copy Markdown
Contributor

Kijewski commented Sep 6, 2014

I will, tomorrow. :)

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 10, 2014

Nevertheless, this one needs a second ACK

@LudwigKnuepfer
Copy link
Copy Markdown
Member

ACK

LudwigKnuepfer pushed a commit that referenced this pull request Sep 10, 2014
core: priority_queue: simplify inheritance
@LudwigKnuepfer LudwigKnuepfer merged commit 2dc8ea1 into RIOT-OS:master Sep 10, 2014
@miri64 miri64 deleted the simplify_queue_inheritance branch October 8, 2014 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: core Area: RIOT kernel. Handle PRs marked with this with care! Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants