Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arpLookup.c #8

Open
cycl0ne opened this issue Apr 26, 2016 · 0 comments
Open

arpLookup.c #8

cycl0ne opened this issue Apr 26, 2016 · 0 comments

Comments

@cycl0ne
Copy link

cycl0ne commented Apr 26, 2016

Hi,

a small change in my opinion:

        entry->waiting[entry->count] = gettid();
        entry->count++;
        ttl = (entry->expires - clktime) * CLKTICKS_PER_SEC;
        restore(im);

and later:

        recvclr();
        switch (recvtime(ttl))
        {
        case TIMEOUT:
        case SYSERR:
            return SYSERR;

If a Timeout occurs, the waiting entry is still in list. if another arp is on the way.. ArpFree finds this entry from timeout and sends the signal to this tid. You do here a recvclr() before, wouldnt it be better to remove the tid from the list, since it ran into a timeout? Would be cleaner/nicer in the code.

Cheers
C.

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

No branches or pull requests

1 participant