Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262389AbVERVda (ORCPT ); Wed, 18 May 2005 17:33:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262385AbVERVdY (ORCPT ); Wed, 18 May 2005 17:33:24 -0400 Received: from mail2.dolby.com ([204.156.147.24]:5899 "EHLO dolby.com") by vger.kernel.org with ESMTP id S262389AbVERVcJ (ORCPT ); Wed, 18 May 2005 17:32:09 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Subject: RE: Illegal use of reserved word in system.h Date: Wed, 18 May 2005 14:31:55 -0700 Message-ID: <2692A548B75777458914AC89297DD7DA08B08670@bronze.dolby.net> X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: Illegal use of reserved word in system.h Thread-Index: AcVb4HYOPIRgULXKSZ6TjAdnkjpQZwABPUIw From: "Gilbert, John" To: Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C55BF1.0359A13E" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 14746 Lines: 233 This is a multi-part message in MIME format. ------_=_NextPart_001_01C55BF1.0359A13E Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable =0D=0ARichard B=2E Johnson writes:=0D=0A=0D=0AThe subject line is invalid= =2E We don't make law here=2E=0D=0AThe correct word is invalid, not illegal= =2E There should not be any=0D=0A"illegal" strings in the kernel either alt= hough they sometimes creep=0D=0Ain=2E=2E=2E=0D=0A=0D=0A#JG=0D=0ASorry, I wa= s borrowing the term from the g++ error that this created=2E=0D=0AI'm not t= rying to imply that someone should be arrested=2E ;^) Also, like=0D=0Aa few= people have already mentioned, it doesn't effect the kernel at all=0D=0Aas= it's strictly a C program=2E=0D=0A=0D=0ANow, if you want the names of stru= cture members changed, you are going=0D=0Ato have to submit a patch=2E You = will also have to patch anything that=0D=0Aaccesses those member names in u= ser-mode=2E=0D=0ANobody is going to do it for you=2E=0D=0A =0D=0A#JG=0D=0AT= hey are very trivial patches, but I'll include them here=2E=0D=0A=0D=0AIt's= also quite presumptuous of you that you think that you can instruct=0D=0Aa= ny of the kernel developers on how to write header files=2E In addition,=0D= =0Aany user-mode code that uses kernel headers is broken by definition=2E= =0D=0AThere is no other operating system except BSD that gives user mode co= de=0D=0Aaccess to kernel-headers=2E Somehow, people have been able to write= =0D=0Aworking code using those operating systems without using kernel heade= rs=2E=0D=0A=0D=0A#JG=0D=0AIncluding header files might be bad practice, but= it's not uncommon, and=0D=0Aonly truly broken when the kernel changes=2E I= know many reasons for why=0D=0Ait's bad, but I also know that it's sometim= es necessary (see below)=2E=0D=0AIt's also usually not my code that breaks,= but I often have to fix it if=0D=0AI want to get the program to work=2E=0D= =0A=0D=0AThere are people who can instruct you in the proper methods of=0D= =0Ainterfacing with the kernel=2E There are even many books that have been= =0D=0Awritten=2E I suggest that if you have a driver that requires access t= o=0D=0Akernel headers, when being accessed by user-mode code, the driver is= =0D=0Abroken=2E Unix/linux provides standard methods of interface to driver= s=2E=0D=0AThey include open(), close(), read(), write(), mmap() and ioctl()= =2E In=0D=0Aaddition, there are various semaphores and signaling mechanisms= like=0D=0Apoll()=2E If you are accessing devices or kernel functions in ot= her than=0D=0Athese standard interfaces, your code is broken beyond all rep= air=2E=0D=0A=0D=0A#JG=0D=0AAs a counter-example, I'm including a program th= at uses /dev/dri to=0D=0Aframelock to vsync=2E It's stupid in multiple ways= but it seems to be=0D=0Acurrently the only semi-portable way to do this un= der X windows=2E It also=0D=0Auses two kernel headers, and if you read thro= ugh the code, it's spin=0D=0Awaiting for the ioctl call to return the right= value, sometimes skipping=0D=0Aa frame=2E If you patch this into a C++ pro= gram with the stock kernel=0D=0Aheaders, it breaks (the drm=2Eh and drm_buf= s=2Ec patches fix this)=2E=0D=0AI'd really appreciate if some kernel develo= per enabled the "Correct" way=0D=0Ato do this=2E If there was a way to wake= a thread (a blocking read on=0D=0A/dev/vsync?) on a video vsync interrupt,= a lot of media players, games,=0D=0Aand other real-time graphics dependant= programs could take less system=0D=0Aresources, and have better quality gr= aphics=2E In the meantime however,=0D=0Athis mostly works today (with patch= ed kernel headers)=2E=0D=0A=0D=0A=0D=0AAlso kernel headers don't show if th= e system the SQL code is running on=0D=0Ais SMP aware and Ray was much bett= er behaved=2E=0D=0A=0D=0A#JG=0D=0AAccording to Adrian Bunk, MySQL is using = inlines from asm/atomic=2Eh (yes,=0D=0Avery bad)=2E The fact they set CONFI= G_SMP manually to expose some=0D=0Aadditional code, but not setting the cpu= count variables breaks builds=0D=0Aunder later 2=2E6 kernels=2E See http:/= /bugs=2Emysql=2Ecom/bug=2Ephp?id=3D10364=0D=0AAgain, it's not my code=2E Tw= eaking a few kernel headers is easier than=0D=0Afixing everyone else's bad = code practices=2E=0D=0A=0D=0AJohn Gilbert=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A----= -------------------------------------=0D=0AThis message (including any atta= chments) may contain confidential=0D=0Ainformation intended for a specific = individual and purpose=2E If you are not=0D=0Athe intended recipient, dele= te this message=2E If you are not the intended=0D=0Arecipient, disclosing,= copying, distributing, or taking any action based on=0D=0Athis message is = strictly prohibited=2E=0D=0A ------_=_NextPart_001_01C55BF1.0359A13E Content-Type: application/octet-stream; name="patch.system.h" Content-Transfer-Encoding: base64 Content-Description: patch.system.h Content-Disposition: attachment; filename="patch.system.h" LS0tIHN5c3RlbS5oLm9yaWcJMjAwNS0wNS0xNyAxNzo0Mjo1MC4wMDAwMDAwMDAgLTA3MDAKKysr IHN5c3RlbS5oCTIwMDUtMDUtMTcgMTc6NDM6MTguMDAwMDAwMDAwIC0wNzAwCkBAIC0yNDQsMjYg KzI0NCwyNiBAQAogI2VuZGlmCiAKIHN0YXRpYyBpbmxpbmUgdW5zaWduZWQgbG9uZyBfX2NtcHhj aGcodm9sYXRpbGUgdm9pZCAqcHRyLCB1bnNpZ25lZCBsb25nIG9sZCwKLQkJCQkgICAgICB1bnNp Z25lZCBsb25nIG5ldywgaW50IHNpemUpCisJCQkJICAgICAgdW5zaWduZWQgbG9uZyBteW5ldywg aW50IHNpemUpCiB7CiAJdW5zaWduZWQgbG9uZyBwcmV2OwogCXN3aXRjaCAoc2l6ZSkgewogCWNh c2UgMToKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18oTE9DS19QUkVGSVggImNtcHhjaGdiICViMSwl MiIKIAkJCQkgICAgIDogIj1hIihwcmV2KQotCQkJCSAgICAgOiAicSIobmV3KSwgIm0iKCpfX3hn KHB0cikpLCAiMCIob2xkKQorCQkJCSAgICAgOiAicSIobXluZXcpLCAibSIoKl9feGcocHRyKSks ICIwIihvbGQpCiAJCQkJICAgICA6ICJtZW1vcnkiKTsKIAkJcmV0dXJuIHByZXY7CiAJY2FzZSAy OgogCQlfX2FzbV9fIF9fdm9sYXRpbGVfXyhMT0NLX1BSRUZJWCAiY21weGNoZ3cgJXcxLCUyIgog CQkJCSAgICAgOiAiPWEiKHByZXYpCi0JCQkJICAgICA6ICJxIihuZXcpLCAibSIoKl9feGcocHRy KSksICIwIihvbGQpCisJCQkJICAgICA6ICJxIihteW5ldyksICJtIigqX194ZyhwdHIpKSwgIjAi KG9sZCkKIAkJCQkgICAgIDogIm1lbW9yeSIpOwogCQlyZXR1cm4gcHJldjsKIAljYXNlIDQ6CiAJ CV9fYXNtX18gX192b2xhdGlsZV9fKExPQ0tfUFJFRklYICJjbXB4Y2hnbCAlMSwlMiIKIAkJCQkg ICAgIDogIj1hIihwcmV2KQotCQkJCSAgICAgOiAicSIobmV3KSwgIm0iKCpfX3hnKHB0cikpLCAi MCIob2xkKQorCQkJCSAgICAgOiAicSIobXluZXcpLCAibSIoKl9feGcocHRyKSksICIwIihvbGQp CiAJCQkJICAgICA6ICJtZW1vcnkiKTsKIAkJcmV0dXJuIHByZXY7CiAJfQo= ------_=_NextPart_001_01C55BF1.0359A13E Content-Type: application/octet-stream; name="patch.drm_bufs.c" Content-Transfer-Encoding: base64 Content-Description: patch.dr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_NextPart_001_01C55BF1.0359A13E Content-Type: application/octet-stream; name="patch.drm.h" Content-Transfer-Encoding: base64 Content-Description: patch.drm.h Content-Disposition: attachment; filename="patch.drm.h" LS0tIGRybS5oLm9yaWcJMjAwNS0wMy0yOSAxMjoyNDoxOS4wMDAwMDAwMDAgLTA4MDAKKysrIGRy bS5oCTIwMDUtMDMtMjkgMTI6MjU6NDEuMDAwMDAwMDAwIC0wODAwCkBAIC00MTEsNyArNDExLDcg QEAKICAqLwogdHlwZWRlZiBzdHJ1Y3QgZHJtX2J1Zl9tYXAgewogCWludAkgICAgICBjb3VudDsJ LyoqPCBMZW5ndGggb2YgdGhlIGJ1ZmZlciBsaXN0ICovCi0Jdm9pZAkgICAgICBfX3VzZXIgKnZp cnR1YWw7CS8qKjwgTW1hcCdkIGFyZWEgaW4gdXNlci12aXJ0dWFsICovCisJdm9pZAkgICAgICBf X3VzZXIgKnZpcnRfbWFwOwkvKio8IE1tYXAnZCBhcmVhIGluIHVzZXItdmlydHVhbCAqLwogCWRy bV9idWZfcHViX3QgX191c2VyICpsaXN0OwkvKio8IEJ1ZmZlciBpbmZvcm1hdGlvbiAqLwogfSBk cm1fYnVmX21hcF90OwogCg== ------_=_NextPart_001_01C55BF1.0359A13E Content-Type: application/octet-stream; name="vsync.h" Content-Transfer-Encoding: base64 Content-Description: vsync.h Content-Disposition: attachment; filename="vsync.h" LyogQW5vdGhlciB3b3JrIGluIHByb2dyZXNzLCBob3BlIHRvIGJlIGFibGUgdG8gc3luYyB0byB2 ZXJ0aWNhbCByZWZyZXNoICovCgojaWZuZGVmIF9NWVZTWU5DX0gKI2RlZmluZSBfTVlWU1lOQ19I CgppbnQgZHJpX2luaXQodm9pZCk7CnZvaWQgZHJpX2Nsb3NlKHZvaWQpOwp2b2lkIGRyaV92Ymxh bmsodm9pZCk7CgojZW5kaWYgLypfTVlWU1lOQ19IKi8K ------_=_NextPart_001_01C55BF1.0359A13E Content-Type: application/octet-stream; name="vsync.c" Content-Transfer-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RpY2tzOwoJCXRvdGFs ICs9IHRpY2tzOwoJCW1lYW52YWwgPSB0b3RhbCAvIGNvdW50OwoJCWZwcmludGYoc3RkZXJyLCAi LTolaVx0OiVsbHVcdDolbGx1XHQ6JWxsdVx0OiVsbHUgICBcciIsIGNvdW50KyssIHRpY2tzLCBt YXh2YWwsIG1pbnZhbCwgbWVhbnZhbCk7Cgl9Cn0KCiNlbmRpZiAvKiBSVU5WU1lOQyAqLwoKaW50 IGRyaV9pbml0KHZvaWQpCnsKCWRyaV9mZCA9IG9wZW4gKCIvZGV2L2RyaS9jYXJkMCIsIE9fUkRX Uik7CglyZXR1cm4gKGRyaV9mZCk7Cn0KCnZvaWQgZHJpX2Nsb3NlKHZvaWQpCnsKCWZwcmludGYo c3RkZXJyLCAiXG5TaHV0dGluZyBkb3duIVxuIik7CglpZiAoZHJpX2ZkICE9IC0xKQoJCWNsb3Nl KGRyaV9mZCk7CglleGl0KDApOwp9Cgp2b2lkIGRyaV92Ymxhbmsodm9pZCkKewoJaW50IHJldDsK CWRybV93YWl0X3ZibGFua190IHZibDsKCgl2YmwucmVxdWVzdC50eXBlID0gX0RSTV9WQkxBTktf UkVMQVRJVkU7Cgl2YmwucmVxdWVzdC5zZXF1ZW5jZSA9IDE7CgoJZG8gewoJCXJldCA9IGlvY3Rs KCBkcmlfZmQsIERSTV9JT0NUTF9XQUlUX1ZCTEFOSywgJnZibCApOwoJLyoJdmJsLnJlcXVlc3Qu dHlwZSAmPSB+X0RSTV9WQkxBTktfUkVMQVRJVkU7ICovCgkJdmJsLnJlcXVlc3QudHlwZSA9IChk cm1fdmJsYW5rX3NlcV90eXBlX3QpICh2YmwucmVxdWVzdC50eXBlICYgfl9EUk1fVkJMQU5LX1JF TEFUSVZFKTsKCX0gd2hpbGUgKHJldCAmJiBlcnJubyA9PSBFSU5UUik7CglyZXR1cm47Cn0K ------_=_NextPart_001_01C55BF1.0359A13E-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/