Releasing Resources

The release_resource function is invoked to release a resource that is in use. kernel/resource.c void release_resource(struct resource *old)

16It is important to note that many system resources could be addressed without the need to reserve them. With few exceptions, processors have no way of enforcing resource reservation. The functions described below should therefore be employed in the interests of a clean programming style, although it would be possible to dispense with reservations in most cases.

17The kernel sources include other functions for allocating resources for reasons of compatibility, but they should no longer be used in new code. There are also functions that search for resources of a certain size so that areas still free are filled automatically. I won't discuss these extended options as they are used only at a few places in the kernel.

Continue reading here: IO Memory

Was this article helpful?

0 0