On 18.12.2023 11:39, Oleksii wrote:
> On Thu, 2023-12-14 at 16:55 +0100, Jan Beulich wrote:
>> On 24.11.2023 11:30, Oleksii Kurochko wrote:
>>> --- a/xen/arch/riscv/include/asm/current.h
>>> +++ b/xen/arch/riscv/include/asm/current.h
>>> @@ -3,6 +3,22 @@
>>>  #ifndef __ASM_CURRENT_H
>>>  #define __ASM_CURRENT_H
>>>  
>>> +#include <xen/percpu.h>
>>> +#include <asm/processor.h>
>>> +
>>> +#ifndef __ASSEMBLY__
>>> +
>>> +struct vcpu;
>>
>> I don't think you need this here?
> Shouldn't forward declaration be for the case of curr_vcpu declaration
> in the next line ?

I don't think so. In C forward decls are needed only when an otherwise
undeclared type is used as type of a function parameter. (C++ is different
in this regard.)

Jan

>>> +/* Which VCPU is "current" on this PCPU. */
>>> +DECLARE_PER_CPU(struct vcpu *, curr_vcpu);
>>> +
>>> +#define current            (this_cpu(curr_vcpu))


Reply via email to