On Tue, May 26, 2009 at 2:17 PM, Timur Tabi wrote:
> Geoff Thorpe wrote:
>
>> rc = spin_event_timeout((ret = in_be32(x) & 0x14), ...);
>
> It's an interesting idea, but I have two problems with it:
>
> 1) This approach is that it depends on the internals of the macro. That is,
> you're sneaking
Geoff Thorpe wrote:
> rc = spin_event_timeout((ret = in_be32(x) & 0x14), ...);
It's an interesting idea, but I have two problems with it:
1) This approach is that it depends on the internals of the macro. That is,
you're sneaking in an assignment in the hopes that the code will behave
properl
Timur Tabi wrote:
> Geoff Thorpe wrote:
>
>> So from this user's perspective (FWIW), it would come as a surprise if
>> the return value reflected the evaluated expression rather than what
>> happened w.r.t. the spin/timeout.
>
> It shouldn't come as a surprise because I've thoroughly documented t
Jon Smirl wrote:
> Then if I don't care about the result (which I think is the common case)...
>
> rc = spin_event_timeout(in_be32(x) & 0x14, ...);
> if (rc)
>timeout_happened;
That's another way of doing it, but I'm already at version 9 of my patch, and
I'm not inclined to make any changes
On Tue, May 26, 2009 at 1:03 PM, Timur Tabi wrote:
> Geoff Thorpe wrote:
>
>> So from this user's perspective (FWIW), it would come as a surprise if
>> the return value reflected the evaluated expression rather than what
>> happened w.r.t. the spin/timeout.
>
> It shouldn't come as a surprise beca
Geoff Thorpe wrote:
> So from this user's perspective (FWIW), it would come as a surprise if
> the return value reflected the evaluated expression rather than what
> happened w.r.t. the spin/timeout.
It shouldn't come as a surprise because I've thoroughly documented the
behavior. I also think r
On Tue, May 26, 2009 at 12:20 PM, Geoff Thorpe
wrote:
> Timur Tabi wrote:
>> On Mon, May 25, 2009 at 12:46 PM, Jon Smirl wrote:
>>
>>> I just tried using this. The !rc has the effect of making the error
>>> return be zero instead the normal not zero.
>>
>> You're confused. It's not a "return cod
Timur Tabi wrote:
> On Mon, May 25, 2009 at 12:46 PM, Jon Smirl wrote:
>
>> I just tried using this. The !rc has the effect of making the error
>> return be zero instead the normal not zero.
>
> You're confused. It's not a "return code", it's a return value. I
> guess I should have called the
On Mon, May 25, 2009 at 12:46 PM, Jon Smirl wrote:
> I just tried using this. The !rc has the effect of making the error
> return be zero instead the normal not zero.
You're confused. It's not a "return code", it's a return value. I
guess I should have called the parameter "ret" instead of "rc
On Tue, May 19, 2009 at 3:26 PM, Timur Tabi wrote:
> The macro spin_event_timeout() takes a condition and timeout value
> (in microseconds) as parameters. It spins until either the condition is true
> or the timeout expires. It returns the result of the condition when the loop
> was terminated.
The macro spin_event_timeout() takes a condition and timeout value
(in microseconds) as parameters. It spins until either the condition is true
or the timeout expires. It returns the result of the condition when the loop
was terminated.
This primary purpose of this macro is to poll on a hardware
11 matches
Mail list logo