bespoke-silicon-group / bsg_manycore

Tile based architecture designed for computing efficiency, scalability and generality
Other
227 stars 58 forks source link

Added missing inline #614

Closed drichmond closed 2 years ago

drichmond commented 2 years ago

If this file is included in multiple .c files that are independently compiled into .o files, the linker will complain about duplicate symbols.

mrutt92 commented 2 years ago

What you actually want here is to use "static"

Any function defined in a header file should be marked static for exactly this reason.

Use of inline is not guaranteed to work.

drichmond commented 2 years ago

Should all of the functions in the header be static, then?

I just mimicked the rest of them.

mrutt92 commented 2 years ago

10000000000% yes

mrutt92 commented 2 years ago

BTW: I'm not saying inline is wrong, you just also need to mark them static.

drichmond commented 2 years ago

Fixed, waiting for CI re-run