Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Takeshi Aihana <takeshi_aihana@montavista.co.jp>
To: linux-mips <linux-mips@oss.sgi.com>
Subject: (Re-Send) shmctl() returns corrupt value on pb1000.
Date: 30 May 2002 20:10:16 +0900	[thread overview]
Message-ID: <1022757017.1045.47.camel@aihana> (raw)

# Sorry, please ignore previous mail I send.

Hello all,

I have a problem now about return the segment size of shared memory from
shmctl() func.

First of step was to start apache_1.3.24 on kernel-2.4.17/pb1000.
However it could not be started because it might be currput segment size
from shmctl() called in apache.
So that I tried to test with shmctl() on
(A)kernel-2.4.17/pb1000/gcc-2.95.3 and (B)kernel-2.4.9/x86/gcc-2.95.3 as
the follows. 
(B) was just returned correct segment size, but (A)'s segment size was 0
(of cause memory on pb1000 was left).

This simple code is follows, and `gcc -o test test.c`.
-----------------------------------8<---------------------------------------
#include <stdio.h>
#include <sys/ipc.h>
#include <sys/shm.h>

int main (void) {
  int shm_id;

  struct shmid_ds ds;
  shm_id = shmget(IPC_PRIVATE, 123, IPC_CREAT|0666);

  if (shm_id < 0) {
    perror ("shmget");
    return 1;
  }

  if (shmctl(shm_id, IPC_STAT, &ds)) {
    perror ("shmctl");
    exit (1);
  }
  printf( "shm_segsz = %d\n", ds.shm_segsz);
}

-----------------------------------8<---------------------------------------

Then each results are,
 x86(kernel-2.4.9/RH-7.2/gcc-2.95.3) : shm_segsz = 123
 pb1000(kernel-2.4.17/gcc-2.95.3)    : shm_segsz = 0

This value of pb1000 could not be expected for me.

So if you have any adivices that should be add option to compile on
pb1000, or if you have been faced similar to this, 
please let me knows.

Thank you for your helps.
Regards.

---
(TAKESHI - MontaVista Software Japan)

             reply	other threads:[~2002-05-30 11:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-30 11:10 Takeshi Aihana [this message]
2002-05-30 12:19 ` (Re-Send) shmctl() returns corrupt value on pb1000 Atsushi Nemoto
2002-05-30 13:02   ` Takeshi Aihana
2002-05-31  2:28     ` Atsushi Nemoto
2002-06-03 10:09       ` Takeshi AIHANA
2002-06-03 12:49         ` Atsushi Nemoto
2002-06-04  3:14           ` Takeshi AIHANA

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1022757017.1045.47.camel@aihana \
    --to=takeshi_aihana@montavista.co.jp \
    --cc=linux-mips@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox