Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 955
Niinle Avatar asked Mar 18 '26 11:03

Niinle


1 Answers

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.

like image 143
2501 Avatar answered Mar 19 '26 23:03

2501



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!