Skip to content
This repository

Minor fix for shared memory test #9

Merged
merged 1 commit into from almost 2 years ago

2 participants

Deepak Goel Shinpei Kato
Deepak Goel

I believe that shared memory test is failing because the value of KEY is being set as 0xdeadbeef, which when treated as a signed integer becomes a negative value. Due to this the following check in gshmget () fails:

 if (key < 0 || size == 0)    (key is considered as a signed integer)
            return -EINVAL;

The change is to set KEY value to 0x7eadbeef, a non-negative number. With this change, it is working fine for me.

Shinpei Kato shinpei0208 referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Shinpei Kato shinpei0208 merged commit 2010fc6 into from
Shinpei Kato shinpei0208 referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Shinpei Kato shinpei0208 referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Shinpei Kato shinpei0208 referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Sep 12, 2012
deepak Fixes the KEY in shm test 6ac7a85
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  test/cuda/common/shm.c
2  test/cuda/common/shm.c
@@ -13,7 +13,7 @@
13 13 #endif
14 14
15 15 #include <gdev_api.h> /* just for GDEV_IPC_RMID */
16   -#define KEY 0xdeadbeef
  16 +#define KEY 0x7eadbeef
17 17
18 18 int copy_to_shm(unsigned int *in, unsigned int size)
19 19 {

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.