* sigproc.h (sigframe::set): Eliminate second argument. Default bp to current
frame pointer rather than using this within the function, which is unstable when this method is not inlined. * net.cc: Eliminate use of second argument to sigframe.set throughout. * select.cc (cygwin_select): Ditto. * sigproc.cc (sig_send): Ditto.
This commit is contained in:
parent
f0338f545d
commit
3b0d65eab9
|
@ -1,3 +1,12 @@
|
|||
Thu Sep 7 23:07:21 2000 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* sigproc.h (sigframe::set): Eliminate second argument. Default bp to
|
||||
current frame pointer rather than using this within the function, which
|
||||
is unstable when this method is not inlined.
|
||||
* net.cc: Eliminate use of second argument to sigframe.set throughout.
|
||||
* select.cc (cygwin_select): Ditto.
|
||||
* sigproc.cc (sig_send): Ditto.
|
||||
|
||||
Thu Sep 7 22:45:16 2000 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
Break out more header info into separate files. Use appropriate
|
||||
|
|
|
@ -428,7 +428,7 @@ cygwin_sendto (int fd,
|
|||
{
|
||||
fhandler_socket *h = (fhandler_socket *) fdtab[fd];
|
||||
sockaddr_in sin;
|
||||
sigframe thisframe (mainthread, 0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
if (get_inet_addr (to, tolen, &sin, &tolen) == 0)
|
||||
return -1;
|
||||
|
@ -454,7 +454,7 @@ cygwin_recvfrom (int fd,
|
|||
int *fromlen)
|
||||
{
|
||||
fhandler_socket *h = (fhandler_socket *) fdtab[fd];
|
||||
sigframe thisframe (mainthread, 0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
debug_printf ("recvfrom %d", h->get_socket ());
|
||||
|
||||
|
@ -611,7 +611,7 @@ cygwin_connect (int fd,
|
|||
int res;
|
||||
fhandler_socket *sock = get (fd);
|
||||
sockaddr_in sin;
|
||||
sigframe thisframe (mainthread, 0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
if (get_inet_addr (name, namelen, &sin, &namelen) == 0)
|
||||
return -1;
|
||||
|
@ -724,7 +724,7 @@ int
|
|||
cygwin_accept (int fd, struct sockaddr *peer, int *len)
|
||||
{
|
||||
int res = -1;
|
||||
sigframe thisframe (mainthread, 0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *sock = get (fd);
|
||||
if (sock)
|
||||
|
@ -910,7 +910,7 @@ int
|
|||
cygwin_shutdown (int fd, int how)
|
||||
{
|
||||
int res = -1;
|
||||
sigframe thisframe (mainthread, 0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *sock = get (fd);
|
||||
if (sock)
|
||||
|
@ -953,7 +953,7 @@ int
|
|||
cygwin_recv (int fd, void *buf, int len, unsigned int flags)
|
||||
{
|
||||
fhandler_socket *h = (fhandler_socket *) fdtab[fd];
|
||||
sigframe thisframe (mainthread, 0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
int res = recv (h->get_socket (), (char *) buf, len, flags);
|
||||
if (res == SOCKET_ERROR)
|
||||
|
@ -979,7 +979,7 @@ int
|
|||
cygwin_send (int fd, const void *buf, int len, unsigned int flags)
|
||||
{
|
||||
fhandler_socket *h = (fhandler_socket *) fdtab[fd];
|
||||
sigframe thisframe (mainthread, 0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
int res = send (h->get_socket (), (const char *) buf, len, flags);
|
||||
if (res == SOCKET_ERROR)
|
||||
|
@ -1366,7 +1366,7 @@ cygwin_rcmd (char **ahost, unsigned short inport, char *locuser,
|
|||
{
|
||||
int res = -1;
|
||||
SOCKET fd2s;
|
||||
sigframe thisframe (mainthread, 0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
int res_fd = fdtab.find_unused_handle ();
|
||||
if (res_fd == -1)
|
||||
|
@ -1406,7 +1406,7 @@ int
|
|||
cygwin_rresvport (int *port)
|
||||
{
|
||||
int res = -1;
|
||||
sigframe thisframe (mainthread, 0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
int res_fd = fdtab.find_unused_handle ();
|
||||
if (res_fd == -1)
|
||||
|
@ -1435,7 +1435,7 @@ cygwin_rexec (char **ahost, unsigned short inport, char *locuser,
|
|||
{
|
||||
int res = -1;
|
||||
SOCKET fd2s;
|
||||
sigframe thisframe (mainthread, 0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
int res_fd = fdtab.find_unused_handle ();
|
||||
if (res_fd == -1)
|
||||
|
|
|
@ -119,7 +119,7 @@ cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||
fd_set *dummy_readfds = allocfd_set (maxfds);
|
||||
fd_set *dummy_writefds = allocfd_set (maxfds);
|
||||
fd_set *dummy_exceptfds = allocfd_set (maxfds);
|
||||
sigframe thisframe (mainthread, 0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
#if 0
|
||||
if (n > FD_SETSIZE)
|
||||
|
|
|
@ -785,7 +785,7 @@ sig_send (_pinfo *p, int sig, DWORD ebp)
|
|||
{
|
||||
thiscatch = sigcatch_main;
|
||||
thiscomplete = sigcomplete_main;
|
||||
thisframe.set (mainthread, 1, ebp);
|
||||
thisframe.set (mainthread, ebp);
|
||||
}
|
||||
}
|
||||
else if (!(thiscatch = getsem (p, "sigcatch", 0, 0)))
|
||||
|
|
|
@ -49,15 +49,11 @@ private:
|
|||
sigthread *st;
|
||||
|
||||
public:
|
||||
void set (sigthread &t, int up = 1, DWORD ebp = 0)
|
||||
void set (sigthread &t, DWORD ebp = (DWORD) __builtin_frame_address (0))
|
||||
{
|
||||
t.lock->acquire ();
|
||||
st = &t;
|
||||
if (ebp)
|
||||
t.frame = ebp;
|
||||
else
|
||||
t.frame = (DWORD) (up ? __builtin_frame_address (1) :
|
||||
__builtin_frame_address (0));
|
||||
t.frame = ebp;
|
||||
t.lock->release ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue