Clemens Zeidler | 1 Jul 2010 08:19

Re: ACPI and IRQ descriptors

Am 29.06.2010, 20:24 Uhr, schrieb Fredrik Holmqvist  
<fredrik.holmqvist@...>:

> 2010/6/28 Clemens Zeidler <clemens.zeidler@...>:
>> Am 29.06.2010, 08:44 Uhr, schrieb Fredrik Holmqvist
>> <fredrik.holmqvist@...>:
>>
>>> Probably would be cleaner to use AcpiCurrentResources and
>>> AcpiPossibleResources instead of calling _CRS and _PRS manually.
>>
>> Where do you found this one!? can't google them and they are not in our
>> tree. These methods would makes thinks easier :-)
>
> Sorry it should be AcpiGetCurrentResources.
>
> http://www.acpica.org/download/acpica-reference.pdf
> See 6.3.2 and 8.9.1-3 and
> http://haiku.it.su.se:8180/source/xref/src/add-ons/kernel/bus_managers/acpi/resources/rsxface.c#273
>
> We need to expose these functions in the ACPI module so it is a bit of  
> work.
>
> Fredrik Holmqvist, TQH
>

ok thank you! will take a look at it in the next days, If you want to play  
with it there is another problem in the structure acpi_pci_routing_table  
in irq_routing_table.h the address must be uint64 otherwise you don't get  
the right link device (source).

(Continue reading)

Wim van der Meer | 1 Jul 2010 13:36
Picon

What is the use of #pragma mark?

I see a lot of commented #pragma mark statements in the Haiku source,
which seems to be a way for Xcode (a suite of tools for developing
software on Mac OS X) to organize source code.

When cleaning up the source code should I leave these alone or is it
ok to remove them?

--

-- 
Wim van der Meer
\/\///\/\

Ithamar R. Adema | 1 Jul 2010 13:57
Picon
Gravatar

Re: What is the use of #pragma mark?

On Thu, 2010-07-01 at 20:36 +0900, Wim van der Meer wrote:
> commented #pragma mark statements in the Haiku source,
> which seems to be a way for Xcode (a suite of tools for developing
> software on Mac OS X) to organize source code.

Not only Xcode, but also our native editor Pe uses these IIRC.

IMHO, they should be kept.

HTH,

Ithamar.

Wim van der Meer | 1 Jul 2010 14:16
Picon

Re: What is the use of #pragma mark?

On Thu, Jul 1, 2010 at 8:57 PM, Ithamar R. Adema
<ithamar.adema@...> wrote:
> On Thu, 2010-07-01 at 20:36 +0900, Wim van der Meer wrote:
>> commented #pragma mark statements in the Haiku source,
>> which seems to be a way for Xcode (a suite of tools for developing
>> software on Mac OS X) to organize source code.
>
> Not only Xcode, but also our native editor Pe uses these IIRC.
>
> IMHO, they should be kept.
>

Even if they are commented out? I don't understand how these
directives can be useful that way.

--

-- 
Wim van der Meer
\/\///\/\

Ingo Weinhold | 1 Jul 2010 14:23
Picon
Picon

Re: What is the use of #pragma mark?

On 2010-07-01 at 14:16:19 [+0200], Wim van der Meer 
<wpjvandermeer@...> wrote:
> On Thu, Jul 1, 2010 at 8:57 PM, Ithamar R. Adema
> <ithamar.adema@...> wrote:
> > On Thu, 2010-07-01 at 20:36 +0900, Wim van der Meer wrote:
> >> commented #pragma mark statements in the Haiku source,
> >> which seems to be a way for Xcode (a suite of tools for developing
> >> software on Mac OS X) to organize source code.
> >
> > Not only Xcode, but also our native editor Pe uses these IIRC.
> >
> > IMHO, they should be kept.
> 
> Even if they are commented out? I don't understand how these
> directives can be useful that way.

They aren't used for the compiler, just for the editor, which is fine with 
them commented. I'm not even sure, if the compiler would complain when 
reading those.

CU, Ingo

Axel Dörfler | 1 Jul 2010 15:02
Picon

Re: What is the use of #pragma mark?

Wim van der Meer <wpjvandermeer@...> wrote:
> On Thu, Jul 1, 2010 at 8:57 PM, Ithamar R. Adema
> <ithamar.adema@...> wrote:
> > On Thu, 2010-07-01 at 20:36 +0900, Wim van der Meer wrote:
> >> commented #pragma mark statements in the Haiku source,
> >> which seems to be a way for Xcode (a suite of tools for developing
> >> software on Mac OS X) to organize source code.
> > Not only Xcode, but also our native editor Pe uses these IIRC.
> > IMHO, they should be kept.
> Even if they are commented out? I don't understand how these
> directives can be useful that way.

See for yourself how Pe presents those. They are definitely useful, and 
should be kept.

Bye,
   Axel.

Maxime Simon | 1 Jul 2010 15:10
Picon
Gravatar

Re: What is the use of #pragma mark?

They aren't used for the compiler, just for the editor, which is fine with
them commented. I'm not even sure, if the compiler would complain when
reading those.


Depending on the options you gave to GCC, you may get a warning like
warning: ignoring #pragma mark

As for #pragma mark itself, it's definitely worth having an editor which
supports it.

Regards,
--
Maxime
Wim van der Meer | 1 Jul 2010 15:12
Picon

Re: What is the use of #pragma mark?

On Thu, Jul 1, 2010 at 10:02 PM, Axel Dörfler <axeld@...> wrote:
> Wim van der Meer <wpjvandermeer@...> wrote:
>> On Thu, Jul 1, 2010 at 8:57 PM, Ithamar R. Adema
>> <ithamar.adema@...> wrote:
>> > On Thu, 2010-07-01 at 20:36 +0900, Wim van der Meer wrote:
>> >> commented #pragma mark statements in the Haiku source,
>> >> which seems to be a way for Xcode (a suite of tools for developing
>> >> software on Mac OS X) to organize source code.
>> > Not only Xcode, but also our native editor Pe uses these IIRC.
>> > IMHO, they should be kept.
>> Even if they are commented out? I don't understand how these
>> directives can be useful that way.
>
> See for yourself how Pe presents those. They are definitely useful, and
> should be kept.
>

Got it. It may be useful to add something about this to the coding guidelines.

--

-- 
Wim van der Meer
\/\///\/\

Andreas Färber | 1 Jul 2010 19:26
Picon
Gravatar

Re: What is the use of #pragma mark?

Am 01.07.2010 um 15:10 schrieb Maxime Simon:

> They aren't used for the compiler, just for the editor, which is  
> fine with
> them commented. I'm not even sure, if the compiler would complain when
> reading those.
>
>
> Depending on the options you gave to GCC, you may get a warning like
> warning: ignoring #pragma mark

There was an awful lot of pragma warnings coming out of mesa code  
recently - #pragma export on, or something...

Andreas

Axel Dörfler | 1 Jul 2010 21:45
Picon

AboutSystem: gcc 2/4 (hybrid)

Hi there,

I thought I would get used to it, but I would like to remove the "GCC 2 
Hybrid" string from AboutSystem again - it's information on a technical 
level that doesn't really concern a standard user, and such a user will 
also not understand any of it, anyway.

Since leaving this string out only in the default configuration does 
not actually hide anything, but delivers the same information to those 
who know (and you have to know to understand it, anyway), why not simply 
hide it?

You would still see if you run a non-standard Haiku build, but for 99% 
of the cases, this information is entirely irrelevant.

Opionions? Especially from Matt, since he changed it to the status quo. 
In any case, I'd volunteer to do that change :-)

Bye,
   Axel.


Gmane