Opened 11 years ago

Closed 11 years ago

#259 closed defect (wontfix)

Provide for single SYSCALLS loader file

Reported by: hans Owned by: gb
Priority: major Milestone:
Component: project hosting Version:
Keywords: Cc:

Description

To load the system call interfaces, one currently has to copy this piece of code:

(eval-when (:compile-toplevel :execute)
  #+linuxppc-target
  (require "PPC-LINUX-SYSCALLS")
  #+linuxx8664-target
  (require "X8664-LINUX-SYSCALLS")
  #+darwinppc-target
  (require "DARWINPPC-SYSCALLS")
  #+darwinx8664-target
  (require "DARWINX8664-SYSCALLS")
  #+freebsdx8664-target
  (require "X8664-FREEBSD-SYSCALLS")
  )

This is rather inconvenient for the user, as every new architecture and every new operating system requires manual patching of the application that uses the system calls. The upcoming 32 bit X86 port will make this particularily apparent.

I would suggest that CCL provided a single "SYSCALLS" module that selectes the right module to load, so that the application can use

(require "SYSCALLS")

If the eval-when could go, it'd be even better.

I am aware that the system call interfaces vary between architectures and operating systems and that one cannot expect (require "SYSCALLS") to provide for one common interface to the system. Given that most operating systems supported will be Unix based, there is significant overlap between the variants and thus it _will_ be possible to just use code cross-platform in many cases.

Change History (2)

comment:1 Changed 11 years ago by rme

In the case of application programs, it seems to me that it would be better to use the libc interfaces (i.e., #_read, #_write, whatever...) rather than the raw syscalls directly.

comment:2 Changed 11 years ago by hans

  • Resolution set to wontfix
  • Status changed from new to closed

I agree - I saw the SYSCALLS reference in the usocket library, but I will change that to use the libc interface to select.

Note: See TracTickets for help on using tickets.