Re: [systemd-devel] [PATCH] prioq: avoid to swap item index

2013-12-16 Thread Lennart Poettering
On Mon, 16.12.13 13:15, Yang Chengwei (chengwei.y...@intel.com) wrote: On Mon, Dec 16, 2013 at 04:57:39AM +0100, Lennart Poettering wrote: On Mon, 16.12.13 04:48, Lennart Poettering (lenn...@poettering.net) wrote: On Mon, 16.12.13 11:03, Chengwei Yang (chengwei.y...@intel.com) wrote:

Re: [systemd-devel] [PATCH] prioq: avoid to swap item index

2013-12-15 Thread Lennart Poettering
On Mon, 16.12.13 11:03, Chengwei Yang (chengwei.y...@intel.com) wrote: the swap() operation of prioq which in fact only swap item's data but keep idx untouched. However, current implement does first swap the idx and then swap back again. Sorry, I do understand? Can you elaborate, please? Is

Re: [systemd-devel] [PATCH] prioq: avoid to swap item index

2013-12-15 Thread Lennart Poettering
On Mon, 16.12.13 04:48, Lennart Poettering (lenn...@poettering.net) wrote: On Mon, 16.12.13 11:03, Chengwei Yang (chengwei.y...@intel.com) wrote: the swap() operation of prioq which in fact only swap item's data but keep idx untouched. However, current implement does first swap the idx

Re: [systemd-devel] [PATCH] prioq: avoid to swap item index

2013-12-15 Thread Yang Chengwei
On Mon, Dec 16, 2013 at 04:57:39AM +0100, Lennart Poettering wrote: On Mon, 16.12.13 04:48, Lennart Poettering (lenn...@poettering.net) wrote: On Mon, 16.12.13 11:03, Chengwei Yang (chengwei.y...@intel.com) wrote: the swap() operation of prioq which in fact only swap item's data but