Skip to content

why k_object_access_grant() execute fail #62187

Answered by mcscholtz
frankey2009 asked this question in Q&A
Discussion options

You must be logged in to vote

I am having the same problem with Zephyr 3.4. I got it to work for regular kernel objects such as mutex's by dynamically allocating them using k_object_alloc

e.g

struct k_mutex *mutex = k_object_alloc(K_OBJ_MUTEX);
k_mutex_init(mutex);
k_object_access_grant(mutex, tid);

Should work for the timer also, you can also try initializing it first and see if that works.

However I cannot get it to work for any device drivers which are all static objects. It behaves like you described above and I cannot figure out why. Only making them public objects works which is not what I want to do.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jukkar
Comment options

jukkar Sep 14, 2023
Collaborator

@mcscholtz
Comment options

@dcpleung
Comment options

@mcscholtz
Comment options

Answer selected by frankey2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants