LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-15-2014, 10:08 AM   #16
prushik
Member
 
Registered: Mar 2009
Location: Pennsylvania
Distribution: gentoo
Posts: 372

Rep: Reputation: 29

Quote:
Originally Posted by sundialsvcs View Post
... whereas I would respectfully dissent, and say to the OP: "if you find a saddle, ride in it, instead of trying to hang-on to the back of the horse." System calls are really designed to be the lowest level interface. There's a lot of stuff that is "ordinarily needed" that has already been built on-top of that layer, in the form of standard system libraries ... both those that are included with the language and those that are not. To me, it's senseless to reinvent any wheel at all. There's no "up-side" to doing it, it takes many hundreds of thousands of microseconds to add-up to the blink of an eye, and there could be a "down-side," therefore ... "why (bother)?"
Right, if we are talking about a program that wants to be platform independent and already uses the standard library, then there is little benefit in using syscalls over the standard library.
However, if the choice is between another dependency (third party library) or using a few syscalls, then syscalls look a lot more attractive, even to the end user who has to install the thing. Now, I can't think of a case where that would ever be the problem, since third party libraries typically implement things that are very difficult with syscalls.
It should also be noted that the OP mentioned the program is meant to run on Linux, so if portability is not an issue then another disadvantage of syscalls disappears.

Anyways, I took a second to do a google search and came up with this: https://github.com/graemeg/freepasca.../src/xattr.pas
Which looks like there is an xattr unit included with the freepascal compiler.
 
Old 04-16-2014, 02:36 AM   #17
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
Originally Posted by sundialsvcs View Post
it takes many hundreds of thousands of microseconds to add-up to the blink of an eye, and there could be a "down-side," therefore ... "why (bother)?"
hear hear!

If you even look at the disk on your way in or out, any microsecond savings will be totally moot plus 100
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how does java calls the system calls which are written in c babu198649 Linux - General 3 12-05-2011 03:40 AM
system calls ashish anand Linux - Embedded & Single-board computer 1 07-17-2011 03:01 PM
What are the disadvantages of using a 64 bit system? drmjh Linux - General 13 07-08-2009 10:30 AM
system calls with C khodeir Programming 4 03-12-2009 08:26 PM
Some system calls Spooky Programming 1 11-24-2004 10:17 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration