pp_semop can fit within Perl_pp_shmwrite().
Nicholas Clark [Fri, 4 Nov 2005 20:20:56 +0000 (20:20 +0000)]
p4raw-id: //depot/perl@26000

mathoms.c
opcode.h
opcode.pl
pp_sys.c

index 9f37371..4721cb2 100644 (file)
--- a/mathoms.c
+++ b/mathoms.c
@@ -990,6 +990,11 @@ PP(pp_syswrite)
     return pp_send();
 }
 
+PP(pp_semop)
+{
+    return pp_shmwrite();
+}
+
 U8 *
 Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
 {
index ca93c09..216f1d9 100644 (file)
--- a/opcode.h
+++ b/opcode.h
@@ -1074,7 +1074,7 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
        MEMBER_TO_FPTR(Perl_pp_shmwrite),       /* Perl_pp_msgrcv */
        MEMBER_TO_FPTR(Perl_pp_semget),
        MEMBER_TO_FPTR(Perl_pp_semctl),
-       MEMBER_TO_FPTR(Perl_pp_semop),
+       MEMBER_TO_FPTR(Perl_pp_shmwrite),       /* Perl_pp_semop */
        MEMBER_TO_FPTR(Perl_pp_require),
        MEMBER_TO_FPTR(Perl_pp_require),        /* Perl_pp_dofile */
        MEMBER_TO_FPTR(Perl_pp_entereval),
index 13fd314..9f0a24c 100755 (executable)
--- a/opcode.pl
+++ b/opcode.pl
@@ -60,7 +60,6 @@ my @raw_alias = (
                 Perl_pp_gmtime => ['localtime'],
                 Perl_pp_semget => [qw(shmget msgget)],
                 Perl_pp_semctl => [qw(shmctl msgctl)],
-                Perl_pp_shmwrite => ['shmread'],
                 Perl_pp_ghostent => [qw(ghbyname ghbyaddr)],
                 Perl_pp_gnetent => [qw(gnbyname gnbyaddr)],
                 Perl_pp_gprotoent => [qw(gpbyname gpbynumber)],
@@ -72,7 +71,7 @@ my @raw_alias = (
                 Perl_pp_link => ['symlink'],
                 Perl_pp_ftrread => [qw(ftrwrite ftrexec fteread ftewrite
                                        fteexec)],
-                Perl_pp_shmwrite => [qw(msgsnd msgrcv)],
+                Perl_pp_shmwrite => [qw(shmread msgsnd msgrcv semop)],
                 Perl_pp_send => ['syswrite'],
                );
 
index b31bc34..c6eb020 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4451,6 +4451,9 @@ PP(pp_shmwrite)
     case OP_MSGRCV:
        value = (I32)(do_msgrcv(MARK, SP) >= 0);
        break;
+    case OP_SEMOP:
+       value = (I32)(do_semop(MARK, SP) >= 0);
+       break;
     default:
        value = (I32)(do_shmio(op_type, MARK, SP) >= 0);
        break;
@@ -4501,19 +4504,6 @@ PP(pp_semctl)
 #endif
 }
 
-PP(pp_semop)
-{
-#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
-    dSP; dMARK; dTARGET;
-    I32 value = (I32)(do_semop(MARK, SP) >= 0);
-    SP = MARK;
-    PUSHi(value);
-    RETURN;
-#else
-    return pp_semget();
-#endif
-}
-
 /* Get system info. */
 
 PP(pp_ghostent)