Niinle
Niinle

Reputation: 121

What does *__errno()= some value mean?

So i am trying to understand simple OS system calls and stumbled upon this line of code witch i don't know what it means : *__errno()= msg.error.number;. Can somebody help me please?

Upvotes: 3

Views: 520

Answers (1)

2501
2501

Reputation: 25752

It is very likely a multithreaded version of errno defined in errno.h.

__errno() call will return a pointer to the thread local int,
and *__errno()= msg.error.number; will write into that int.

That should normally be wrapped in a macro, so you don't see the call or dereference.

Upvotes: 4

Related Questions