threadinfo.hh revision 10810
110810Sbr@bsdpad.com/*
210810Sbr@bsdpad.com * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
310810Sbr@bsdpad.com * All rights reserved.
410810Sbr@bsdpad.com *
510810Sbr@bsdpad.com * This software was developed by the University of Cambridge Computer
610810Sbr@bsdpad.com * Laboratory as part of the CTSRD Project, with support from the UK Higher
710810Sbr@bsdpad.com * Education Innovation Fund (HEIF).
810810Sbr@bsdpad.com *
910810Sbr@bsdpad.com * Redistribution and use in source and binary forms, with or without
1010810Sbr@bsdpad.com * modification, are permitted provided that the following conditions are
1110810Sbr@bsdpad.com * met: redistributions of source code must retain the above copyright
1210810Sbr@bsdpad.com * notice, this list of conditions and the following disclaimer;
1310810Sbr@bsdpad.com * redistributions in binary form must reproduce the above copyright
1410810Sbr@bsdpad.com * notice, this list of conditions and the following disclaimer in the
1510810Sbr@bsdpad.com * documentation and/or other materials provided with the distribution;
1610810Sbr@bsdpad.com * neither the name of the copyright holders nor the names of its
1710810Sbr@bsdpad.com * contributors may be used to endorse or promote products derived from
1810810Sbr@bsdpad.com * this software without specific prior written permission.
1910810Sbr@bsdpad.com *
2010810Sbr@bsdpad.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2110810Sbr@bsdpad.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2210810Sbr@bsdpad.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2310810Sbr@bsdpad.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2410810Sbr@bsdpad.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2510810Sbr@bsdpad.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2610810Sbr@bsdpad.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2710810Sbr@bsdpad.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2810810Sbr@bsdpad.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2910810Sbr@bsdpad.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3010810Sbr@bsdpad.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3110810Sbr@bsdpad.com */
3210810Sbr@bsdpad.com
3310810Sbr@bsdpad.com#ifndef __ARCH_GENERIC_FREEBSD_THREADINFO_HH__
3410810Sbr@bsdpad.com#define __ARCH_GENERIC_FREEBSD_THREADINFO_HH__
3510810Sbr@bsdpad.com
3610810Sbr@bsdpad.com#include "cpu/thread_context.hh"
3710810Sbr@bsdpad.com#include "sim/system.hh"
3810810Sbr@bsdpad.com#include "sim/vptr.hh"
3910810Sbr@bsdpad.com
4010810Sbr@bsdpad.comnamespace FreeBSD {
4110810Sbr@bsdpad.com
4210810Sbr@bsdpad.comclass ThreadInfo
4310810Sbr@bsdpad.com{
4410810Sbr@bsdpad.com  private:
4510810Sbr@bsdpad.com    ThreadContext *tc;
4610810Sbr@bsdpad.com    System *sys;
4710810Sbr@bsdpad.com
4810810Sbr@bsdpad.com  public:
4910810Sbr@bsdpad.com    ThreadInfo(ThreadContext *_tc)
5010810Sbr@bsdpad.com        : tc(_tc), sys(tc->getSystemPtr())
5110810Sbr@bsdpad.com    {
5210810Sbr@bsdpad.com
5310810Sbr@bsdpad.com    }
5410810Sbr@bsdpad.com    ~ThreadInfo()
5510810Sbr@bsdpad.com    {}
5610810Sbr@bsdpad.com};
5710810Sbr@bsdpad.com
5810810Sbr@bsdpad.com} // namespace FreeBSD
5910810Sbr@bsdpad.com
6010810Sbr@bsdpad.com#endif // __ARCH_GENERIC_FREEBSD_THREADINFO_HH__
61