mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
libast/sfio: remove unused Vthread API and support code
Sfio may theoretically be compiled with threads support using a separate AT&T library called Vthread, also by Kiem-Phong Vo. That library was never shipped in the AST distribution, though. It is only available with a standalone version of Sfio. The only standalone Sfio version with Vthread that I've found is from 2005, mirrored at <https://github.com/lichray/sfio>. More recent versions never seem to have made it out of the defunct AT&T software download site. Even if they weren't, the rest of libast doesn't support threads, and at this point it never will, so for our purposes the Sfio threads code is never going to be usable. Meanwhile, macros such as SFMTXENTER and SFMTXRETURN make the code a lot harder to read. And not quite all threading code is disabled; some of it is dead code that is getting compiled in. Chances are that code now won't work properly in any case as we've not had any chance to test it as we were making changes. Bit rot has surely set in by now. So this commit expands all the sfio/stdio threading-related macros to their non-threads fallbacks (which is null for most of them, but not all), deletes dead mutex-related code and struct fields, and removes the related documentation from the sfio.3 man page. Unless I did something wrong, there should be no change in behaviour.
This commit is contained in:
parent
56c0c24b55
commit
4ca578bde4
63 changed files with 300 additions and 1065 deletions
|
|
@ -2,7 +2,7 @@
|
|||
* *
|
||||
* This software is part of the ast package *
|
||||
* Copyright (c) 1985-2012 AT&T Intellectual Property *
|
||||
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
|
||||
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
|
||||
* and is licensed under the *
|
||||
* Eclipse Public License, Version 1.0 *
|
||||
* by AT&T Intellectual Property *
|
||||
|
|
@ -28,7 +28,7 @@ fdopen(int fd, const char* mode)
|
|||
{
|
||||
int flags;
|
||||
|
||||
if (fd < 0 || !(flags = _sftype(mode, NiL, NiL, NiL)))
|
||||
if (fd < 0 || !(flags = _sftype(mode, NiL, NiL)))
|
||||
return 0;
|
||||
return sfnew(NiL, NiL, (size_t)SF_UNBOUND, fd, flags);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue