To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1558
1557  |  1559
Subject: 
Re: getpid?
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 15 Dec 2000 02:28:05 GMT
Viewed: 
1264 times
  
Eddie,

Would there be any problem making these inline, seeing how they're one-liners?
(I'm assuming here that the H8 target implements inline)

Regards,

ROSCO

In lugnet.robotics.rcx.legos, Eddie C. Dost writes:

The following patch will add both getpid() and getppid() to legOS:

diff -u -r1.2 unistd.h
--- include/unistd.h    2000/08/01 01:12:40     1.2
+++ include/unistd.h    2000/12/14 21:49:56
@@ -94,4 +94,7 @@
//! kill all processes with priority lower or equal than p, excluding self.
extern void killall(priority_t p);

+extern pid_t getpid(void);
+extern pid_t getppid(void);
+
#endif // __unistd_h__



Message has 1 Reply:
  Re: getpid?
 
(...) I wouldn't want to do so, not because the H8 does not implement inline, but because cpid is a local variable to tm.c (although it is not declared as such...). I think it's cleaner to have this user - kernel interface in real functions. Eddie (...) (24 years ago, 15-Dec-00, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: getpid?
 
(...) The following patch will add both getpid() and getppid() to legOS: diff -u -r1.2 unistd.h --- include/unistd.h 2000/08/01 01:12:40 1.2 +++ include/unistd.h 2000/12/14 21:49:56 @@ -94,4 +94,7 @@ //! kill all processes with priority lower or (...) (24 years ago, 14-Dec-00, to lugnet.robotics.rcx.legos)

7 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR