This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
problem with synth. target: error 38
- From: Alexander Neundorf <neundorf at kde dot org>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Fri, 19 Nov 2004 01:33:36 +0100
- Subject: [ECOS] problem with synth. target: error 38
- Reply-to: neundorf at kde dot org
Hi,
I'm trying to get the shmget/shmat/shmdt system calls working under the
synthetic target. I didn't find much documentation, only that the calls just
take one argument which is a pointer to an array of six integers. So here's
what I tried:
SYSCALL1(ipc) //defines cyg_hal_sys_ipc
int cyg_syscall_ipc(unsigned int call, int first, int second, int third, void
*ptr, unsigned int fifth)
{
int ipc_args[6];
ipc_args[0]=call;
ipc_args[1]=first;
ipc_args[2]=second;
ipc_args[3]=third;
ipc_args[4]=(int)ptr;
ipc_args[5]=fifth;
return cyg_hal_sys_ipc(ipc_args);
}
int cyg_hal_sys_shmget (int key, int size, int shmflg)
{
return cyg_syscall_ipc(CYG_HAL_SYS_IPCOP_shmget, key, size, shmflg, NULL,
0);
}
void * cyg_hal_sys_shmat (int shmid, const void* shmaddr, int shmflg)
{
void * result;
void * raddr;
result = (void *) cyg_syscall_ipc(CYG_HAL_SYS_IPCOP_shmat, shmid, shmflg,
(int) (&raddr), (void*)shmaddr, 0);
return result;
}
when calling this cyg_hal_sys_shmget() with a valid key, it returns -38, the
same for cyg_hal_sys_shmat() also -38 is returned. Error 38 is ENOSYS.
The system call id is 117, which should be correct.
Any hints what I'm doing wrong ?
Bye
Alex
--
Work: alexander.neundorf@jenoptik.com - http://www.jenoptik-los.de
Home: neundorf@kde.org - http://www.kde.org
alex@neundorf.net - http://www.neundorf.net
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss