fd_array.cc (11856:103e2f92c965) fd_array.cc (11886:43b882cada33)
1/*
2 * Copyright (c) 2016 Advanced Micro Devices, Inc.
3 * All rights reserved.
4 *
5 * For use for simulation and test purposes only
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:

--- 308 unchanged lines hidden (view full) ---

317
318std::shared_ptr<FDEntry>
319FDArray::getFDEntry(int tgt_fd)
320{
321 assert(0 <= tgt_fd && tgt_fd < _fdArray.size());
322 return _fdArray[tgt_fd];
323}
324
1/*
2 * Copyright (c) 2016 Advanced Micro Devices, Inc.
3 * All rights reserved.
4 *
5 * For use for simulation and test purposes only
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:

--- 308 unchanged lines hidden (view full) ---

317
318std::shared_ptr<FDEntry>
319FDArray::getFDEntry(int tgt_fd)
320{
321 assert(0 <= tgt_fd && tgt_fd < _fdArray.size());
322 return _fdArray[tgt_fd];
323}
324
325void
326FDArray::setFDEntry(int tgt_fd, std::shared_ptr<FDEntry> fdep)
327{
328 assert(0 <= tgt_fd && tgt_fd < _fdArray.size());
329 _fdArray[tgt_fd] = fdep;
330}
331
325int
326FDArray::closeFDEntry(int tgt_fd)
327{
328 if (tgt_fd >= _fdArray.size() || tgt_fd < 0)
329 return -EBADF;
330
331 int sim_fd = -1;
332 auto hbfdp = std::dynamic_pointer_cast<HBFDEntry>(_fdArray[tgt_fd]);

--- 12 unchanged lines hidden ---
332int
333FDArray::closeFDEntry(int tgt_fd)
334{
335 if (tgt_fd >= _fdArray.size() || tgt_fd < 0)
336 return -EBADF;
337
338 int sim_fd = -1;
339 auto hbfdp = std::dynamic_pointer_cast<HBFDEntry>(_fdArray[tgt_fd]);

--- 12 unchanged lines hidden ---