Skip to content

Conversation

@eecheng87
Copy link
Collaborator

@eecheng87 eecheng87 commented Feb 8, 2023

This commit support a new command 'merge', which merge queues into one sorted queue in ascending order. Besides, this commit forwards the declaration of 'qcontext_t' to queue.h since 'q_merge' needs to traverse the chain.

Relative test bench is added into trace-03-ops.cmd and the answer has been updated in lab0-c-private.

@eecheng87 eecheng87 force-pushed the master branch 2 times, most recently from 820f12b to de670c2 Compare February 8, 2023 07:37
Copy link
Contributor

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix grammar mistakes in git commit message. Also, do follow the manner of How to Write a Git Commit Message.

This commit supports a new command 'merge', which
merges queues into a queue in ascending order.
Even if queues are not sorted, 'merge' can be called.
However, we will get the wrong answer, which is
detected immediately after the call.

Besides, this commit forwards the declaration
of 'qcontext_t' from qtest.c to queue.h.
It is because that 'q_merge' needs to traverse the chain.

Relative test bench is added into trace-03-ops.cmd
@jserv jserv merged commit ff3e842 into sysprog21:master Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants