crc table

Asked by regulararmy on 2013-11-28

Hello Didier,
          In your lib,there is five crc tables with 256 char elements in the comp and decomp struct, I find they are same, why do you define the tables as global variable only in one file. Thank you.

Regards,
cxs

Question information

Language:
English Edit question
Status:
Solved
For:
rohc Edit question
Assignee:
No assignee Edit question
Solved by:
Didier Barvaux
Solved:
2014-03-04
Last query:
2014-03-04
Last reply:
2013-12-01

Hello,

The tables are defined in crc.c but they are declared as 'extern' in rohc.h so they could be used anywhere in the ROHC library.

Please note that those global variables are deprecated, they are not used anymore. They are kept for compatibility with earlier versions.

Regards,
Didier

regulararmy (regulararmy) said : #2

why do you not use the global variables anymore, are there some special reasons?

Global variables are not great for multi-threaded environments.

Didier

regulararmy (regulararmy) said : #4

Thanks Didier Barvaux, that solved my question.