Skip to content

questions about test of lazy-linked-list #1

@ryuxin

Description

@ryuxin

This is a great project, and I am learning your code now.
I have some questions about some code in the synchrobench/c-cpp/src/linkedlists/lazy-list/test.c
It has some code like this

#ifdef SIMPLE
	d->nb_add++;
#else
	if (ret != -2)
	{
		d->nb_add++;
	}
#endif

https://github.com/bitslab/ffwd/blob/master/synchrobench/c-cpp/src/linkedlists/lazy-list/test.c#L196-L203

  1. What is the difference between the two cases? I did not see SIMPLE is defined anywhere.
  2. In the else case, you check if ret is -2. However, I think the ret can never be -2, as you only return 0, 1, or -1. For example, some code here
    https://github.com/bitslab/ffwd/blob/master/synchrobench/c-cpp/src/linkedlists/lazy-list/ffwd_lazy.c#L92-L97

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions