Lavya
Lavya

Reputation: 1585

Use of __exit token in linux kernel

What is the use of __exit token in loadable linux kernel modules and kernel in general? I see the explation for __init in /include/linux/init.h but couldn't find a general or particular (for the case loadable modules) anywhere.

Upvotes: 1

Views: 163

Answers (1)

gby
gby

Reputation: 15218

Very simple - __exit marks code that is used in module destruction. If you compiled a feature as built-in into the kernel and not a module or under configuration that forbids kernel module unload (yes, there is one), that code doesn't need to be loaded to RAM.

Upvotes: 2

Related Questions