Bug 55835 - [linux] [patch] Linux IPC emulation missing SETALL syscall
Summary: [linux] [patch] Linux IPC emulation missing SETALL syscall
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 4.8-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-21 14:30 UTC by Martin Nilsson
Modified: 2008-04-15 20:28 UTC (History)
0 users

See Also:


Attachments
file.diff (622 bytes, patch)
2003-08-21 14:30 UTC, Martin Nilsson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Nilsson 2003-08-21 14:30:14 UTC
This patch implements the missing SETALL syscall in linux_ipc.c
With this patch I'm able to run the Linux version of the PervasiveSQL 2000 database
Pervasive.SQL-7.94.251.005-2000i.i386.rpm

Pervasive V8 requires further work.

Can somebody please check if it really is this easy to implement the LINUX_SETALL call!

Work on this sponsored by: Harrys Bilskrot AB (www.harrysbilskrot.se)

Fix: Patch is against todays RELENG_4 this part of the code doesn't seem to be changed in CURRENT
Comment 1 Eric Anholt 2003-11-07 00:04:42 UTC
On Thu, 2003-11-06 at 07:19, Martin Nilsson wrote: 
> Hi,
> 
> While in the linuxulator can you please take a look at kern/55835
> it is a very simple patch that makes it possible to run the Pervasive 
> database (btrieve) on FreeBSD.
> 
> Thanks,
> 
> Martin

I compared the linux and FreeBSD SETALL ioctls, and there was one
difference I saw.  On linux SETALL updates sem_ctime, while the FreeBSD
version doesn't.  Since I don't actually understand how this code works
and how correct we demand our linux compat to be, or if updating
sem_ctime would be valuable for FreeBSD, I don't think I'll commit it
unless another committer chimes in.

>From a linux semctl manpage:
       SETALL      Set  semval  for all semaphores of the set using arg.array,
                   updating also the sem_ctime member of the  semid_ds  struc-
                   ture  associated  to the set.  Undo entries are cleared for
                   altered semaphores in all processes.  Processes sleeping on
                   the  wait  queue  are  awakened if some semval becomes 0 or
                   increases.  The argument semnum is  ignored.   The  calling
                   process  must have alter access privileges on the semaphore
                   set.


-- 
Eric Anholt                                eta@lclark.edu          
http://people.freebsd.org/~anholt/         anholt@FreeBSD.org
Comment 2 Bruce M Simpson freebsd_committer freebsd_triage 2004-06-18 13:11:29 UTC
Responsible Changed
From-To: freebsd-bugs->emulation

One for the emulation team
Comment 3 Roman Divacky freebsd_committer freebsd_triage 2008-04-15 20:25:49 UTC
State Changed
From-To: open->closed

This was commited in rev. 1.54 of compat/linux/linux-ipc.c