From: Nicholas Clark Date: Fri, 4 Nov 2005 20:20:56 +0000 (+0000) Subject: pp_semop can fit within Perl_pp_shmwrite(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ca563b4e7524b82fcbffcbe3344a4a9d20a7ab64;p=p5sagit%2Fp5-mst-13.2.git pp_semop can fit within Perl_pp_shmwrite(). p4raw-id: //depot/perl@26000 --- diff --git a/mathoms.c b/mathoms.c index 9f37371..4721cb2 100644 --- 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) { diff --git a/opcode.h b/opcode.h index ca93c09..216f1d9 100644 --- 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), diff --git a/opcode.pl b/opcode.pl index 13fd314..9f0a24c 100755 --- 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'], ); diff --git a/pp_sys.c b/pp_sys.c index b31bc34..c6eb020 100644 --- 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)