home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / vmsnet / internal / 1688 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  1.6 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!usc!news.service.uci.edu!unogate!mvb.saic.com!macro32
  2. From: <mahan@TGV.COM>
  3. Newsgroups: vmsnet.internals
  4. Subject: Re: Another newbie C internals question
  5. Message-ID: <921216120221.26400434@TGV.COM>
  6. Date: Wed, 16 Dec 92 12:02:21 PST
  7. Organization: Macro32<==>Vmsnet.Internals Gateway
  8. X-Gateway-Source-Info: Mailing List
  9. Lines: 28
  10.  
  11. In article <1992Dec15.161738.1258@mwk.uucp> you write:
  12. #
  13. #  OK, I'm still converting thousands of lines of MACRO-32 to DEC C on
  14. #an Alpha. I am now wondering about "library functions" such as memcpy,
  15. #strncpy and the like.
  16. #
  17. #  Is there any reason to think they would be safe to call in kernel
  18. #mode, at high IPL, and with spinlocks held? Or would that be more like
  19. #expecting lib$get_input to work in the middle of a driver?
  20. #
  21.  
  22. It is absolutely not safe to call any of the C RTL routines from kernel mode.
  23. Some might work, others like sprintf, horrible mangale the stack.  This is
  24. not good as on the Alpha there is nothing to clean up after you and get the
  25. stack back in the proper order.  You should determine what it is you really
  26. need and possible 1) Write the code yourself or 2) make use of the OTS$ routines
  27. to do this for you.  Also, you what to take advantage of the linkage
  28. pragma to enforce "light-weight" call frames.
  29.  
  30. --
  31. Patrick L. Mahan
  32.  
  33. --- TGV Window Washer ------------------------------- Mahan@TGV.COM ---------
  34.  
  35. Waking a person unnecessarily should not be considered  - Lazarus Long
  36. a capital crime.  For a first offense, that is            From the Notebooks of
  37.                                                           Lazarus Long
  38.  
  39.