Find the answer to your Linux question:
Results 1 to 2 of 2
Hi,guys: In the kernel 2.6, there are not defined MOD_INC_USE_COUNT and MOD_INC_COUNT. What functions I should use to instead those? thanks!...
  1. #1
    Just Joined!
    Join Date
    May 2007
    Posts
    9

    what is instead of counter in kernel 2.6

    Hi,guys:
    In the kernel 2.6, there are not defined MOD_INC_USE_COUNT and MOD_INC_COUNT. What functions I should use to instead those?
    thanks!

  2. #2
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404
    You use try_module_get() for incrementing the refcount and module_put() for decrementing the refcount.

    These are SMP-safe functions.
    The Unforgiven
    Registered Linux User #358564

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...