Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
eb1116b3
Commit
eb1116b3
authored
25 years ago
by
Simon Marlow
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1999-08-26 13:34:36 by simonmar]
threadDelay etc. should be defined in PrelConc.
parent
327b1c6e
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ghc/lib/std/PrelConc.lhs
+3
-13
3 additions, 13 deletions
ghc/lib/std/PrelConc.lhs
ghc/lib/std/PrelHandle.lhs
+0
-11
0 additions, 11 deletions
ghc/lib/std/PrelHandle.lhs
with
3 additions
and
24 deletions
ghc/lib/std/PrelConc.lhs
+
3
−
13
View file @
eb1116b3
...
...
@@ -194,19 +194,9 @@ specified file descriptor is available for reading (just like select).
@threadWaitWrite@ is similar, but for writing on a file descriptor.
\begin{code}
{- Not yet -- SDM
threadDelay, threadWaitRead, threadWaitWrite :: Int -> IO ()
threadDelay (I# x#) = IO $ \ s# ->
case delay# x# s# of
s2# -> (# s2#, () #)
threadWaitRead (I# x#) = IO $ \ s# ->
case waitRead# x# s# of
s2# -> (# s2#, () #)
threadWaitWrite (I# x#) = IO $ \ s# ->
case waitWrite# x# s# of
s2# -> (# s2#, () #)
-}
threadDelay (I# ms) = IO $ \s -> case delay# ms s of s -> (# s, () #)
threadWaitRead (I# fd) = IO $ \s -> case waitRead# fd s of s -> (# s, () #)
threadWaitWrite (I# fd) = IO $ \s -> case waitWrite# fd s of s -> (# s, () #)
\end{code}
This diff is collapsed.
Click to expand it.
ghc/lib/std/PrelHandle.lhs
+
0
−
11
View file @
eb1116b3
...
...
@@ -1180,17 +1180,6 @@ mayBlock fo act = do
CCALL(setNonBlockingIOFlag__) fo -- reset file object.
CCALL(setConnNonBlockingIOFlag__) fo -- reset (connected) file object.
return rc
-- #ifdef __HUGS__
threadDelay, threadWaitRead, threadWaitWrite :: Int -> IO ()
-- Hugs does actually have the primops needed to implement these
-- but the primops don't actually do anything...
threadDelay (I# ms) = IO $ \s -> case delay# ms s of s -> (# s, () #)
threadWaitRead (I# fd) = IO $ \s -> case waitRead# fd s of s -> (# s, () #)
threadWaitWrite (I# fd) = IO $ \s -> case waitWrite# fd s of s -> (# s, () #)
-- #endif
\end{code}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment