From owner-freebsd-current Fri May 29 07:17:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA10915 for freebsd-current-outgoing; Fri, 29 May 1998 07:17:26 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from mailhub.fokus.gmd.de (mailhub.fokus.gmd.de [193.175.134.209]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA10824 for ; Fri, 29 May 1998 07:17:10 -0700 (PDT) (envelope-from schilling@fokus.gmd.de) Received: from sherwood.gmd.de (sherwood [193.175.133.102]) by mailhub.fokus.gmd.de (8.8.8/8.8.8) with ESMTP id QAA07375; Fri, 29 May 1998 16:14:34 +0200 (MET DST) Received: (from jes@localhost) by sherwood.gmd.de (8.8.8+Sun/8.8.8) id QAA12750; Fri, 29 May 1998 16:14:14 +0200 (MET DST) Date: Fri, 29 May 1998 16:14:14 +0200 (MET DST) From: Joerg Schilling Message-Id: <199805291414.QAA12750@sherwood.gmd.de> To: freebsd-current@FreeBSD.ORG, schilling@fokus.gmd.de Subject: Re: cdrecord trouble on currnet Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG First some notes. You are discussing things related to cdrecord. If you like to see your effort back in the main stream cdrecord, this is definitely the wring mailing list. cdwrite@lists.debian.org is the list for discussions related to cdrecord. I got your mail only by accident from dejanews. >> > I am getting write errors on my Philips 2600 CD-R using cd-write and burncd.sh >> > (from /usr/share/examples/worm/ ) so I thought , I'l compile cdrecord and try >> > that. But I get the following error when truying to do a dummy burn: >> > >> > $ sudo cdrecord -dev=0,4,0 -data -dummy /scratch/img/psnl >> > Cdrecord release 1.6 Copyright (C) 1995-1998 Jörg Schilling >> > cdrecord: Function not implemented. WARNING: Cannot set RR-scheduler This seems to be a problem in FreeBSD & the Posix standard. All other operating systems that define _POSIX_PRIORITY_SCHEDULING have it functional. >> > Bus error (core dumped) If you are not able to analyze the core with adb and send a usable bug description, I cannot help.. >> > This is a freshly compiled port on a current cvsupped today. >> >> (I wonder why he is trying to use the round robin scheduler - I >> expect he wants the FIFO one). >> >> Cdrecord has autoconf'd in the P1003.1B scheduler interface. >> >> I'm probably going to have to change how I did things, but the >> program may need fixing also. By default, with nothing defined, >> the new system calls are setup to be LKM'd in for development and >> will fail at run time with ENOSYS or if you check for their presense >> with sysconf(). >> You can add build time support with the _KPOSIX_PRIORITY_SCHEDULING >> >> See how cdrecord is deciding to use priority scheduling. If it >> decides that a program that links OK without checking any compile >> time feature test macros means that priority scheduling is supported, >> then that should be changed. I've been told some programs are >> doing this (not specifically cdrecord). >I looked at the cdrecord source and the code calling sched_scheduler is in >an #ifdef _POSIX_PRIORITY_SCHEDULING block. >Apperently that gets defined in /usr/include/sys/unistd.h because _posix.h >defines _P1003_1B_VISIBLE Do you have any newer pointers to on-line versions of the POSIX standard? >> If you set _POSIX_C_SOURCE to 199009L with a -D in the makefile >> and cderecord still tries to use the round robin scheduler then >> someone has screwed up - either us or cdrecord - so try that too. Is is not as easy as you think!!!!! Cdrecord is not a FreeBSD program. It is highly portable and for that reason cannoot adopt to any rubbish added to a specific operating system. On SVr4 systems the _POSIX_PRIORITY_SCHEDULING is definitely worse than the RT priocntl() interface and proicntl with RR scheduling is even available since the early days of SVr4. I cannot change the source in a way that only makes sure that nothing works after the change. >> It checks _POSIX_PRIORITY_SCHEDULING at build time. > >That's understandable, then. >> Can you give an example of the correct mechanism for using sysconf() to >> determine the availability of the scheduler? I'll fix it in the >> updates I'm working on. > if (sysconf(_SC_PRIORITY_SCHEDULING) == -1) { > if (errno != 0) { > /* This isn't valid: > */ > err(EX_OSERR, "sysconf(_SC_PRIORITY_SCHEDULING)"); > } > else { > errx(EX_UNAVAILABLE, > "No run-time support for POSIX priority scheduling"); > } > } This code is highly non-portable as it uses non-standard interfaces (err & errx) This is a common problem on *BSD. Programs written for *BSD tend to get more and more non-portable. Again: It is not as easy as you expect. If you like to co-operate with me, you should discuss this on the right forum and not in a private play ground. A note to CAM: CAM seems to be very similar in general (but diffrerent in spcific) to an interface called SCSA documented and developped by Sun in 1987-1988. The SCSA API is very similar to the earlier Sun architecture used since 1986. The scg drvier which I wrote in 1986 is based on this interface and itself is the base for my portable SCSI user-level command transport system. It should be faily easy to make a CAM adoption layer for scg. I am currently still working on DVD-R support for cdrecord with is the first UNIX program that supports DVD-R. The new ESO (www.eso.org) supertelescope data will be archived using cdrecord and a DVD-R writer. If this project is finished, I am planning to create a "real" SCSI library from the stuff originally written for 'sformat' and cdrecord. I am also planning an ABI checker for this library which should make it easy to check if a transport adaption layer is written the right way. Jörg EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin js@cs.tu-berlin.de (uni) If you don't have iso-8859-1 schilling@fokus.gmd.de (work) chars I am J"org Schilling URL: http://www.fokus.gmd.de/usr/schilling ftp://ftp.fokus.gmd.de/pub/unix To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message