[Cbe-oss-dev] [PATCH 2/3] libspe2: Fix scmctl buffer type

D. Herrendoerfer d.herrendoerfer at herrendoerfer.name
Tue Mar 4 23:29:48 EST 2008


This patch fixes the declaration of the shmctl buffer parameter
which was a declared to be in PPE memory before.
This function is part of a set that is disabled at the moment
and may be removed in the future. But nonetheless it should
be correct.

Signed-off-by: Dirk Herrendoerfer < herrend at de.ibm.com >

Index: libspe2/spebase/default_posix1_handler.c
===================================================================
--- libspe2/spebase/default_posix1_handler.c    (revision 101)
+++ libspe2/spebase/default_posix1_handler.c    (working copy)
@@ -1014,8 +1014,6 @@ static int default_posix1_handler_shmdt(
  *
  *     int shmctl(int shmid, int cmd, struct shmid_ds *buf);
  *
- * For this interface 'buf' is taken to be an EA pointer rather
- * than an LS offset.
  */
 static int default_posix1_handler_shmctl(char *ls, unsigned long
opdata)
 {
@@ -1024,15 +1022,15 @@ static int default_posix1_handler_shmctl
     DECL_RET();
     int shmid;
     int cmd;
-    addr64 buf;
+    void *buf;
     int rc;
 
     DEBUG_PRINTF("%s\n", __func__);
     shmid = arg0->slot[0];
     cmd = arg1->slot[0];
-    buf.by32[0] = arg2->slot[0];
-    buf.by32[1] = arg2->slot[1];
-    rc = shmctl(shmid, cmd, (struct shmid_ds *) ((unsigned long)
buf.all64));
+    buf = GET_LS_PTR(arg2->slot[0]);
+
+    rc = shmctl(shmid, cmd, (struct shmid_ds *) buf);
     PUT_LS_RC(rc, 0, 0, errno);
 #else
     DECL_0_ARGS();





More information about the cbe-oss-dev mailing list