Commit 669743b9 authored by Adam Wujek's avatar Adam Wujek 💬

arch-wrs: printout more details when wrs_shm_write is called

Commit based on the commit from wrs-switch-sw described below.

userspace/libwr: printout more details when wrs_shm_write is called

It might be usefull to know whether caller wanted to lock or unlock the shmem
and which shmem.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 18b0f27d
......@@ -208,9 +208,18 @@ void *wrs_shm_follow(struct wrs_shm_head *head, void *ptr)
void wrs_shm_write_caller(struct wrs_shm_head *head, int flags,
const char *caller)
{
head->sequence += 2;
pr_debug("caller of a function %s is %s\n", __func__, caller);
char *msg = "Wrong parameter";
if (flags == WRS_SHM_WRITE_BEGIN) {
msg = "write begin";
}
if (flags == WRS_SHM_WRITE_END) {
msg = "write end";
}
pr_debug("caller of a function wrs_shm_write is %s, called for \"%s\" "
"with the flag \"%s\"\n", caller, head->name, msg);
head->sequence += 2;
if (flags == WRS_SHM_WRITE_BEGIN) {
if (head->sequence & WRS_SHM_LOCK_MASK)
pr_error("Trying to lock already locked shmem on the "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment