All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Marques <pmarques@grupopie.com>
To: Arne Henrichsen <ahenric@yahoo.com>
Cc: "Randy.Dunlap" <rddunlap@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: sys_sem* undefined
Date: Thu, 26 Aug 2004 15:08:51 +0100	[thread overview]
Message-ID: <412DEEF3.2010408@grupopie.com> (raw)
In-Reply-To: <20040826090508.79320.qmail@web41508.mail.yahoo.com>

Arne Henrichsen wrote:
> Hi Randy,
> 
> thanks for the help. I am very new to Linux
> programming, and I do not understand what you mean
> with  'syscalls are not called by name'. 
> 
> I did find the header file syscalls.h, recompiled my
> code but it still says the following:
> 
> *** Warning: "sys_semop"
> [/prj/builds/host/linux/prj.ko] undefined!
> *** Warning: "sys_semctl"
> [/prj/builds/host/linux/prj.ko] undefined!
> *** Warning: "sys_semget"
> [/prj/builds/host/linux/prj.ko] undefined!
> 
> And when I load the module, then it tells me:
> 
> insmod: error inserting './prj.ko': -1 Unknown symbol
> in module
> 
> So, I call sys_sem* functions from my code. What else
> must I do?

Syscalls are supposed to be called from userspace, so that the kernel 
does something on behalf of an application.

Some syscalls have their do_<syscall name> equivalent because it makes 
sense to call them from inside the kernel, but others don't.

If you want to use semaphores inside the kernel I suggest you read the 
Rusty Rusell's Unreliable Guide to Kernel Locking first:

http://wwwos.inf.tu-dresden.de/~ch12/diplom/DocBook/kernel-locking/

I hope this helps,

-- 
Paulo Marques - www.grupopie.com

  reply	other threads:[~2004-08-26 14:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-25 11:50 sys_sem* undefined Arne Henrichsen
2004-08-25 16:14 ` Randy.Dunlap
2004-08-26  9:05   ` Arne Henrichsen
2004-08-26 14:08     ` Paulo Marques [this message]
2004-08-26 13:44   ` Arne Henrichsen
2004-08-26 16:28     ` Randy.Dunlap
2004-08-27  9:26       ` Arne Henrichsen
2004-09-05  3:51         ` Pete

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=412DEEF3.2010408@grupopie.com \
    --to=pmarques@grupopie.com \
    --cc=ahenric@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.